So I have this code:
$query = "SELECT COUNT(id) FROM users WHERE UPPER(username) = UPPER($name)";
$result = mysql_query($query);
list($count) = mysql_fetch_row($result);
if($count >= 1) {
echo 'Username already exists; }
and for some reason when I test it on my wamp server I get back: "Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in..." but it gets the job done! User is registered. I know you must first do the query and then fetch rows but I did that! So what is the problem :/