Page 1 of 1
how to
Posted: Fri Nov 28, 2003 9:31 am
by kujtim
I want thet wen you click submite to open the page the
the displayed page will be activ onli a few seconds and then withaut clicking and doing nothing the page should be remuved by it self and get back where was before......
help me
Posted: Fri Nov 28, 2003 9:58 am
by liviu
Posted: Fri Nov 28, 2003 10:11 am
by patrikG
also, have a look at [php_man]header[/php_man].
Code: Select all
<?php
header("location: ".$_SERVER["HTTP_REFERER"]);
?>
You can also add a delay if you like. Do note, however, that according to PHP manual, $_SERVER["HTTP_REFERER"] depends on the browser and apparently not all browser handle it correctly.
Personally, I've not had any browser giving me problems with it.
Posted: Fri Nov 28, 2003 10:32 am
by Weirdan
patrikG wrote:Personally, I've not had any browser giving me problems with it.
Just an example: Opera with 'referer logging' option turned off.
Posted: Fri Nov 28, 2003 12:37 pm
by m3mn0n
I would use a plain old meta refresh.
Code: Select all
<?php
$back = $_SERVER['HTTP_REFERER'];
$seconds = 15; // time measured in seconds
?>
<meta http-equiv="refresh" content="<?php echo $seconds; ?>; url=<?php echo $back; ?>">
<?php
// this will send them back if nothing happens on the page
?>
this must be within the
<head> tags