I thought i read somewhere that you could refer to the field by number.  Was
i wrong? It doesn't seem to make a difference anyway.  It still doesn't
work.  Here's the code with words instead of numbers.  I'd be grateful if
you could let me know if there are any obvious errors.

Best wishes.

Steven M

include 'db.php';

$result = mysql_query("SELECT newtest FROM users WHERE newtest = '$0'");
list($number) = mysql_fetch_row($result);

if($number==0)
{mysql_query("UPDATE users SET points = '$+2' WHERE newtest = '$0'");
mysql_query("UPDATE users SET newtest = '$1' WHERE newtest = '$0'");
header("Location: redirect1.php");
}
elseif($number==1)
{
header("Location: redirect2.php");
}
else
{
header("Location: error.php");
}



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

Reply via email to