I have an html form which has 2 fields realuser and useremail it then submits on the php page .i have a database table named auth .my database has 3 fields i.e realuser,useremail and details ,in which i have filled "details" field already and rest 2 fields are blank.i have php script which insert the 2 fields submitted via html form in database.
i want when user submits the form, it then insert the 2 fields into table named "auth". i want that when user fills it then automatically the data from details field sent to the email id taken from "useremail" field.
BUT i an facing the problem that when user submit the form.the database filled with same "realuser" and "usermail"..for example i fill "john" and "email@example.com" in html form and then submit..then when i see the database it filled john and firstname.lastname@example.org all over the table.
my code is :
// Connects to your Database
mysql_connect("localhost", "john", "nicho123") or die(mysql_error());
mysql_select_db("john_321") or die(mysql_error());
echo "connected to database";
$update = "UPDATE auth SET realuser = '".$_POST."' , realpass = '".$_POST."' ";
PLEASE HELP ME.. :(
THNX IN ADVANCE :)