Registration page in PHP

I am creating a PHP registration page and I'm completely confused as to what to do next.

Whenever the form is validated correctly and submitted, the only table that gets updated is the USERS table and it needs to also update SecInfo and Shipping.

This is a class assignment, and I am trying to finalize the kinks. I can feel I am close if one the mysql_query's are working out of 3.

if($errorCount == 0){

$userSQL = "INSERT INTO Users(UserID, FName, LName, Email, Phone, Address, City, UserState, Zip) VALUES ('{$uName}', '{$fName}', '{$lName}', '{$email}', '{$phone}', '{$add}', '{$city}', '{$uState}', '{$zip}')";

$secSQL = "INSERT INTO SecInfo(UserID, Password, SQuestion, SAnswer) VALUES ('{$uName}', '{$sec_pwd}', '{$sQues}', '{$sAns}')";

$shipSQL = "INSERT INTO Shipping(ShipAdd, ShipCity, ShipState, ShipZip)VALUES ('{$shipAdd}', '{$shipCity}', '{$sState}', '{$shipZip}')";


echo "Successfully submitted!";
echo "Form data missing for specific fields!";

QUESTION: (If you need HTML you can ask) Is the code not inserting into SecInfo and Shipping because I am calling the mysql_query method too many times at the end?

This is a contained project, as in sql_injection isn't going to be an issue.


Do you have a specific question? I'm confused as to what you need help with exactly. But I noticed you've got quit a bit of SQL/PHP jumbled up into a long sequence of tasks. My advice, would be to start small, test your code, then carefully add new pieces of code and test it constantly, this is how you will understand where the error lies, and why the SecInfo and Shipping tables are not being updated.

Also, it looks like there is a lot of unnecessary stuff in your code, if all your doing is updating/adding to 3 tables, you shouldn't need that many lines of code. hope this helps.

Need Your Help

show nearest places with 1km radius from user lat and longitudes

geolocation latitude-longitude

I recently stated working on gps maps. I have a database with list of lat and longitudes. when a user access my web app, I want to display places with in 1km or specified radius from user point.

Accessing table names in .mdb file using Python package Adodbapi


I'm writing an application in Python and I'm using the Adodbapi package to handle my sql queries. For one part of the code, I need to communicate with an Access '97 (no, it's not a typo) database, ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.