RE: [PHP] PHP_SELF
| From: | Chris Worth | Date: | Wed, 01 Aug 2001 16:44:25 +0000 |
| Subject: | RE: [PHP] PHP_SELF | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-60698@lists.php.net to get a copy of this message | ||
LOL,
Jon, you just made me realize the typo I had in my script.
Thanks a bunch. I had some ==, but there were two = which was making my head
hurt.
thanks for the post.
On Tue, 31 Jul 2001 09:16:26 +0100, Jon Haworth wrote:
>> if ($post = "1" && $Age = " ") {echo "NO";}
>> else {echo "YES";}
>> Now here is what happens. On a first time view of the page it outputs
>> 'NO' (Good). If I dont enter anything in the age field and submit the
>> form it outputs 'NO' (Good). If I enter a value into the age field and
>> submit, it outputs 'NO' (Not Good).
>
>You are assigning these values, not comparing them
>
>$post = "1" // puts "1" in the variable $post
>$post == "1" // compares $post to "1"
>
>you need to change your code to
>
>if ($post == "1" && $age == " ") { blah blah blah
>
>HTH
>Jon
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
>For additional commands, e-mail: php-general-help@lists.php.net
>To contact the list administrators, e-mail: php-list-admin@lists.php.net
>