Quote:
quote:Originally posted by Dai
What do you do if you want to automatically redirect to another page after an if statement. Do yu use meterefresh or is there some php code to deal with this?
|
Well, if you want to do it via Javascript or with an HTML meta refresh tag, you should only output that code if your conditions are met within PHP.
example:
<?php
if( some condition )
{
echo "<meta http-equiv=\"refresh\" content=\"5\" />\n";
}
// else don't generate refresh code.
...
?>
Simple as that.
Take care,
Nik
http://www.bigaction.org/