Hello Anthony,

Sunday, February 15, 2004, 4:43:12 PM, you wrote:

AR> Why doesn't the call to !isset() with the negation mark loads the next page
AR> when a name is not entered?

Because it's using isset() in the wrong capacity.

isset() does not check to see if a variable HAS a value, it checks to
see if the variable exists.

The variable in the code you posted will always exist, so the use of
isset() is redundant and should be changed for something like empty as
you noted. Stick the following in the top of your code to see:

<?php
        echo "<pre>";
        print_r($_GET);
        echo "</pre>";
?>

I feel the book you're learning from might not be the best out there!
Especially as it uses the horrible if : else : endif notation,
includes code on the same line as the PHP tags themselves and is
teaching you to code with register globals on. Is the book still on
sale? (i.e. did you buy it recently) or was it something you've had
for a while/got 2nd hand?

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to