Not sure exactly what kind of "reload" you are talking about?
I assume you mean the client's browser should reload at specific times:
PHP can't reload a site, the browser does a reload if instructed to,
therefore you need to tell the client's browser to reload the page, just
add:
<META HTTP-EQUIV=REFRESH CONTENT="10; URL=RCStudent.php">
to your html head. Here the page is reloaded every 10 seconds
PHP can redirect with header location like someone else just mentioned.
And a redirect works only if you haven't echoed any html before doing a:
header("Location: ....);
T. Wintershoven schrieb:
Quote:
Hi all,
>
Is there a simple way in php to reload a page coded within an if
statement.(see code below)
It's very important that the session stays intact.
The filename is RCStudent.php
>
**************** A peace of code***************************
<?php
session_start();
?>
>
if($_POST['ST']!='')
{
$_SESSION['nScreen']=2'';
}
elseif ($_POST['AT']!='')
{
$_SESSION['nScreen']=0'';
>
*** RELOAD CODE HERE ***
}
>
******************* End code*******************************
>
T.i.a.
>
Regards,
>
Tino Wintershoven.
The Netherlands.
>
>