I'm a moron. So?

From: Date: Sat, 21 Apr 2001 02:42:10 +0000
Subject: I'm a moron. So?
Groups: php.general 
Request: Send a blank email to php-general+get-49630@lists.php.net to get a copy of this message
Alrighty. I'm baack! Anyways, I seem to be having stupid little problems, al of which are driving me insane. I'll feel really stupid when you tell me the problem. A friend told me something about "seeding" for random() but I didn't find anything on that. This is the HTML section... <HTML> <HEAD> <TITLE>Horse Race v.1</TITLE> </HEAD> <BODY> Welcome to horse racing v.1. This is a simple PHP game where you can train, race and win money for your animals. Eventually I'll make it a whole barn with feeding and horses, and costs, age, breeding. So on. But for now, this is just a simple game.<br><br> Enter six names of horses. <FORM ACTION="horse.php" METHOD="post"> Name1 : <INPUT TYPE="text" NAME="name1" size="24"><BR> Name2 : <INPUT TYPE="text" NAME="name2" size="24"><BR> Name3 : <INPUT TYPE="text" NAME="name3" size="24"><BR> Name4 : <INPUT TYPE="text" NAME="name4" size="24"><BR> Name5 : <INPUT TYPE="text" NAME="name5" size="24"><BR> Name6 : <INPUT TYPE="text" NAME="name6" size="24"><BR> <input type="submit" name="submitNms" value="race them!"> </FORM> <center>Good luck! </BODY> </HTML> ---------------- This is the PHP... <? $name1 = "$n1"; $name1 = "$n2"; $name3 = "$n3"; $name4 = "$n4"; $name5 = "$n5"; $name6 = "$n6"; $randomHorse = rand($name1, $name6); $randomStrides = rand(1, 10); echo "$randomHorse won the race by $randomStrides ! Congratulations."; ?> ------------------- And I feel stupid. <g> -Owen

« previous php.general (#49630) next »