I am writing a dynamic web page. The specific problem I am having is dealing with taking form information and adding it to a user in a table in a database that already exists.
So, I have a landing page where someone enters their name, email and password. This works fine, and a user is created in the table in my database with the respective information included. I then reroute them to a page where I ask them to fill out more information. I automatically fill out their name and email fields with php. I have set up rules that prevent a duplicate email address. But I just want to add the additional information to the same user in the table in the database.
What I used to add the information to the database the first time they enter info:
//Insert user into the database
$query = "INSERT INTO `tablename`
(`first_name`, `last_name`, `email`, `salt`, `password`)
VALUES
('$first_name', '$last_name', '$email', '$salt', '$password')";
What command do I use to add information to the same user on the next page?
May I recommend this tutorial?