0

When i do refresh in php, the data in iframe become blank. How i still get the search results in iframe after press "refresh" button? Thanks!


In the iframe, it just like the search information php

<iframe width="650" height="400" frameborder="0" scrolling="yes" copyhistory="yes" name="Shopping" src="http://localhost/search.php" ></iframe>
3
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by cliffcc
0

If iframe's search page is your php code then you can make a session and save last url in that session.
When page is loaded or refreshed you can use session's remembered url as a src of iframe.

0

WHy are you using an iframe? Possible to use ajax?

0

What is the code to save the last url? Thanks!

This is the simplest way to save current page url.
<?
	$_SESSION['sess_currPageName'] = basename($_SERVER['PHP_SELF']).'?'.$_SERVER['QUERY_STRING'];
?>

Agree to ardav, i also prefer ajax than iframe.
As in ajax all controls are in your hand.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.