?
Solved

PHP iFrame to another server

Posted on 2007-04-02
6
Medium Priority
?
295 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
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 
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

How To Reduce Deployment Times With Pre-Baked AMIs

Even if we can't include all the files in the base image, we can sometimes include some of the larger files that we would otherwise have to download, and we can also sometimes remove the most time-consuming steps. This can help a lot with reducing deployment times.

Question has a verified solution.

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

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
This article discusses how to implement server side field validation and display customized error messages to the client.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Suggested Courses

762 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