Re: Random number Question
| From: | Ralph Friedman | Date: | Wed, 13 Mar 2002 19:50:52 +0000 |
| Subject: | Re: Random number Question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-88390@lists.php.net to get a copy of this message | ||
In article <20020313035421.28517.qmail@pb1.pair.com>, Jennifer Downey wrote:
> <input type="text" size="3">
> <INPUT TYPE="submit" VALUE="Submit my number" NAME="guess">
>
you've got the "Name" attribute attached to the wrong INPUT element:
<INPUT type="text" size="3" name="guess">
<INPUT type="submit" value="Submit my number">
> if($guess = = $number) {
>
incorrect syntax here. that should be:
if ($guess == $number) {
better would be:
if (trim($guess) == $number {
this will assure that there's no whitespace in $guess
--
Rgds
Ralph