khan11
Jan 8th 2009, 7:03 am
Hello guys!
I'm creating a login/logout script, the script is working fine but it is not very well featured, i would like to put a restriction that when someone tries to signup with same username or same email that is signed up before, it should give an error.
I tried somefin like if($fieldname['username'] == $_POST['username']) { // give an error }
but this doesn't seem to work. $fieldname is an array fetching data from mysql. and $_POST['username'] is the username that will be used on signup, please guide me on where i'm wrong or what should i do to put a restriction..
thanks in advance.
I'm creating a login/logout script, the script is working fine but it is not very well featured, i would like to put a restriction that when someone tries to signup with same username or same email that is signed up before, it should give an error.
I tried somefin like if($fieldname['username'] == $_POST['username']) { // give an error }
but this doesn't seem to work. $fieldname is an array fetching data from mysql. and $_POST['username'] is the username that will be used on signup, please guide me on where i'm wrong or what should i do to put a restriction..
thanks in advance.