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') {

<?php
include("connect.php");
$result=mysql_query("select * from table where
username='$username'",$connection) or die ("Can't do it");
$num = mysql_numrows($result);

if ($num = 0) {
        print "<html>error message etc.
        exit;
}

Jeff Oien

-- 
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