Forum Moderators: coopster

Message Too Old, No Replies

php iframe problem

3rd party database connection via IFRAME

         

stender

10:25 am on Sep 15, 2005 (gmt 0)

10+ Year Member



Hi All, would appreciate some help as I have no php knowledge and little coding, and before you ask why do it in php then? The server is php only!

Anyway, I'm setting up a travel site for my niece and she has signed up with a company that provides a searchable database of holidays via an iframe. Now i've done the html and have a homepage index.php which contains a search form with drop downs such as destination airport, departure airport. This posts to a results.php page where it lists the holidays available. I have it working in as much as it returns all holidays, however it still brings back all even if i select 1 destination. Therefore I need to know how to send the form selections to the iframe?

Here is the iframe tag from the results page.
<iframe src="http://example.co.uk/EntryPoints/Level1Search.aspx?SearchType=Package&DeptDateFrom=&DeptDateTo=&DeptAirport=&DestAirport=&Nights=&MaxPrice=&TourOp=&WebsiteGUID=ADE5CD93-0DBB-4359-BD3A-044BD7B2FE11" frameborder="0" width="640" height="800" scrolling="yes" name="results"></iframe>

If anyone can help this novice it would be much appreciated and will motivate me into learning php!

cheers

[edited by: coopster at 2:40 pm (utc) on Sep. 15, 2005]
[edit reason] generalized url [/edit]

King_Kong

11:53 am on Sep 15, 2005 (gmt 0)

10+ Year Member



Right you need to pass the variables from your submitted form to the iframe.

ie..

<iframe src="http://example.co.uk/EntryPoints/Level1Search.aspx?SearchType=Package&DeptDateFrom=<? echo $_POST['from_date']?>
&DeptDateTo=<? echo $_POST['to_date']?>
&DeptAirport=<? echo $_POST['etc']?>&DestAirport=<? echo $_POST['etc']?>&Nights=<? echo $_POST['etc']?>&MaxPrice=<? echo $_POST['etc']?>&TourOp=<? echo $_POST['etc']?>&WebsiteGUID=ADE5CD93-0DBB-4359-BD3A-044BD7B2FE11" frameborder="0" width="640" height="800" scrolling="yes" name="results"></iframe>

[edited by: coopster at 2:41 pm (utc) on Sep. 15, 2005]
[edit reason] generalized url [/edit]

stender

1:08 pm on Sep 15, 2005 (gmt 0)

10+ Year Member



Thanks for the reply. I've just found out I should of been using get not post, and using these for the variables <? echo $_REQUEST['DestAirport'];?>

cheers