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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -