I looked at the other link briefly but din't see your code other than if !res...
put some mysql die things in there will tell you if the connection is failing.
i woudl do somethign like this clearly it won't work as is 🙂
but what it sounds like is your checking query is always returning something to result.
### DB Connection here
$res = mysql_query("SELECT email from $table where email='$email'") or die(mysql_error();
$row = mysql_fetch_row($res);
echo $row[0]; // will tell you if row is empty, just for error checking.
if(is_null($row)) { // maybe doing if(mysql_num_rows($res) == 0) would be better?
mysql_query("INSERT.... ") or die(mysql_error());
blah
blah
blah
echo "Thank you for singing up";
} else {
mysql_query("UPDATE $table....") or die(mysql_error();
blah
blah
blah
echo "Account Updated";
}
mysql_close($db);