I'm by no stretch of the imagination a good programmer. So i copied this code from this forum, and added some line I thought might make it work. All i want is this index.php file to redirect the user to one of 4 diffrent spalsh pages, randomly, on my site. I though this might work, but i get an error return. Any suggestions?
<?php
srand((double)microtime()*1000000);
$randstring = "";
for ($i=0;$i<1;$i++) {
$randstring = $randstring.rand(1,4);
}
if ($randstring == "1") {header("location:/redhtml.htm");}
elseif ($randstring == "2") {header("location:/greenhtml.htm");}
elseif ($randstring == "3") {header("location:/bluehtml.htm");}
elseif ($randstring == "4") {header("location:/kakihtml.htm");}
exit;
?>
Thank you in advance.