I have built a form to enter registration details into a mysql database. The form connects ok and inputs the details in to the members table with one big problem it puts an = sign in front of all the details thus preventing username and password verification on login. I also want instead of getting an echo of "you have successfully..." would like to go to a thanks.html page. Here is the code:
<?php
mysql_connect("HOSTNAME", "USER", "PASS") or die(mysql_error());
mysql_select_db("DATABASE") or die(mysql_error());
mysql_query("INSERT INTO members
(Name, Email, Telephone, Mobile, Username, Password) VALUES('$name= $_POST[name]', '$email= $_POST', '$telephone= $_POST[telephone]', '$mobile= $_POST[mobile]', '$username= $_POST[username]', '$password= $_POST[password]' ) ")
or die(mysql_error());
echo "<a href=\"login.html\"><strong>You have successfully registered, you can now login.</strong></a>";
echo "<br />";
?>
<?php
mysql_connect("HOSTNAME", "USER", "PASS") or die(mysql_error());
mysql_select_db("DATABASE") or die(mysql_error());
mysql_query("INSERT INTO members
(Name, Email, Telephone, Mobile, Username, Password) VALUES('$name= $_POST[name]', '$email= $_POST', '$telephone= $_POST[telephone]', '$mobile= $_POST[mobile]', '$username= $_POST[username]', '$password= $_POST[password]' ) ")
or die(mysql_error());
echo "<a href=\"login.html\"><strong>You have successfully registered, you can now login.</strong></a>";
echo "<br />";
?>