Hi
I'm trying to learn how to create a random page using rand() function
but also using the $num
to switch
each page.
Is there a way to click a button? I only used the Refresh Button
on Firefox. Plus it's not really display the data but only page name which is page1.php
, page2.php
, page3.php
.
Each page has one word in which is
page1.php = How
page2.php = are
page3.php = you?
<?php
$num = rand(1,3);
switch ($num) {
case 1: echo "page1.php";
break;
case 2: echo "page2.php";
break;
case 3: echo "page3.php";
break;
}
?>
I appreciate any Suggestions or explaining to why it doesn't display the word but instead it display the file name "page1.php
" Thanks!