I’m basicly making a high low game.
It generates a random number 1 – 10 then you guess if it will the next random number will will be higher or lower.
[code=php]<?
$page = $_GET[“g”];
switch($g)
{
case ‘h’:
echo ‘guesses next number will be higher’;
echo $number1;
break;
case ‘l’:
echo ‘guesses next number will be higher lower’;
break;
default:
$number1 = rand(1,10);
echo $number1;
break;
}
?><br>
<br>
<a href=”http://www.geek.cairns-hosting.com/highlow/highlow.php?g=h” target=”_self”>Higher</a> <a href=”http://www.geek.cairns-hosting.com/highlow/highlow.php?g=l” target=”_self”>Lower</a>
The problem is when it goes to [url]http://www.geek.cairns-hosting.com/highlow/highlow.php?g=h[url]http://www.geek.cairns-hosting.com/highlow/highlow.php?g=l
Does anyone have a better way to do this?