php - Warning: Creating default object from empty value -
i'm checking whether or not username , email user has entered taken. works fine; if it's in use doesn't register account , informs user, if it's not taken account made, however, warning message regardless.
this error coming from, based off tutorials have been using code should work fine:
$sql = "select username, email users username = $username , email = $email"; $result = $conn->query($sql); if ($result->num_rows = 0)
change : if ($result->num_rows = 0)//assignment to: if ($result->num_rows == 0)//condition checking.
Comments
Post a Comment