[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

PHP iFrame to another server

Posted on 2007-04-02
6
Medium Priority
?
297 Views
Last Modified: 2010-08-05
Hello -
I am new to php and iFrame.  I have a php form that needs to be seen on a website that's server is controlled by our IT department.  I need my form to no appear on the main page, have a link on the navigation bar and show up on a separate target.  I'm not sure where to put the code to make this work.

Here's a portion of my code:
<FORM NAME="horizonsOnApp" ACTION="online_thank_you.php" METHOD="POST" onsubmit="return fieldcheck()">
          <table width="100%" border="0" cellspacing="1" cellpadding="1" name="Form Table" bgcolor="#FFFFFF">
            <tr bgcolor="#0099CC">
The site it needs to iFrame to is http://ebiz.sbc.com/horizons/.  CAN ANYONE HELP?
0
Comment
Question by:moette88
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 18

Accepted Solution

by:
Mark Gilbert earned 2000 total points
ID: 18836251
Hi, I may not fully understand your question but from what I have read so far, you would like to put an iframe into your page, and get the form on the main part of the page, to submit to the iframe?  if this is correct, try the following:

<IFRAME SRC="http://ebiz.sbc.com/horizons/" WIDTH=100 HEIGHT=100 frameborder="0" style="border-width:0px" scrolling="no" id="news" name="horizons"></IFRAME>

In your form, change the form tag to the following:

<FORM NAME="horizonsOnApp" ACTION="online_thank_you.php" METHOD="POST" onsubmit="return fieldcheck()" target="horizons">

Basically what I have done here is created an iframe containing a page, in this instance the link you provided and called it horizons.  In the form, I have told the form to use the iframe as the target of the form, so the form will kind of post itself to the iframe, and not refresh the page.  

Hope this helps.
0
 
LVL 18

Assisted Solution

by:Mark Gilbert
Mark Gilbert earned 2000 total points
ID: 18836264
Oh, and if you need to link items from the main page into the iframe, simply give each link a target="horizons", such as the following:

<a href="mypagename.php" target="horizons">text for link here</a>
0
 

Author Comment

by:moette88
ID: 18836501
Thanks for the help!

I actually need it to do the reverse.  I need to add the Horizons php form to the http://ebiz.sbc.com/horizons/ website, but i do not have access to the http://ebiz.sbc.com/horizons/ coding.  Can that be done?
0
Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

 
LVL 18

Expert Comment

by:Mark Gilbert
ID: 18837390
Hi, if you don't have access to the external websites code, I'm afraid there's no way of changing it's links or targets to different iframes, or even pages for that matter.  Their code I would assume has been specifically coded for their website, and not for external references.

Hope this helps.
0
 

Author Comment

by:moette88
ID: 18837405
I appreciate your help.  That is what i was afraid of.

I did test the other solution and it worked well.
0
 
LVL 18

Expert Comment

by:Mark Gilbert
ID: 18837487
Hi Moette, glad I was able to provide you with some assistance.  Have a great day.
0

Featured Post

Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question