Hey, I was wondering whats wrong with this code, i've tried a lot and I come up with nothing.
CODE:
ERROR:
Anybody have any ideas?[/code]
CODE:
| Code: |
| <?php
$rand = (rand('0, 20')); $post = $_POST['number']; if ($rand == $post) { echo "Congrats, the number was <b>$rand</b>!"; } else { echo "Sorry, you guessed the wrong number! Try again. Remember the numbers are between 1-20!"; } echo '$rand'; ?> <form action="randomnumber.php" method="post"> Your number: <input type="text" name="number"> <input type="submit" value="Submit!"> </form> |
ERROR:
| Code: |
| Warning: rand() expects exactly 2 parameters, 1 given in /home/diablos/domains/gamerzheaven.frih.net/public_html/hotelmario/games/randomnumber.php on line 2 |
Anybody have any ideas?[/code]
