"Jeff Oien" <[EMAIL PROTECTED]> wrote:
> This code won't work. I'm trying to get an error if the username
> is entered incorrectly but it won't go through the if brackets. I even
> tried printing out $num and it's 0. I also tried
> if ($num = "0") {
> if ($num = '0') {

The single "=" sets the variable $num to that value.  A double "==" is an
equality comparison operator - that's what you want in this case.  Also,
since mysql_numrows() returns a number, not a string, you don't need quots
around the 0.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to