Here is my code. For some reason, if I submit the form without placing and passwords in, it still creates the database entry. There are some comments scattered throughout th
simple solution: if(!empty($_POST['xxx']) == true)
almost equals when you use:
if(isset($_POST['xxx']) == true && $_POST['xxx'] != '')
except: isset() regards 0(string or number) as true, while empty() regards 0 as true.
Null and/or empty strings are still set if the variable is declared. Try this:
if(isset($_POST['user_pass']) && $_POST['user_pass'] != "")
isset checks that the variable is set - in this case it is set to '' (an empty string). Try using empty() as well.
Check this one too
if(isset($_POST['user_pass']) && !empty($_POST['user_pass']))
isset() will check that if the POST is set for 'user_pass' & !empty() will check that if the value is empty.