Forum Moderators: coopster
Getting and sending the data obtained in Step 1 in a MySQL Database named, for example, "Users" has done ok using php in the first form; the problem is Step 3, because it is necessary that the user must insert the transaction operation number and his/her username and password in the form "Step3" to the same database "Users"... Is it possible to insert firstly data through the "form_step1" and then insert data through the "form_step3" to the line in the SAME DATABASE? I think is not possible because each insert creates a new line, and specially when every line (or user insert) has a "User_id" with auto_incrementent primary key column. So, what can I do? Must I create 2 different Mysql databases? Or one database and 2 different tables named "Users_data" and "Confirmation_data"? - In thess to cases, how can I do to "join" or "check" the information obtained in this 2 different databases or tables to finally giving access to a new user to a "Member Zone" in my site?
Thank you very much for your help and support.
Percy
one possibility is to set a cookie or use a session, then when they are returned to your site your script can verify that user_id and then insert into that row of the table.
If the cookie or session does not exist at that point then you could have the user confirm name and address or email or some other piece of information to be able to find them in your table.
The proccess of the suscription is:
1) 1st Step:
A new user enters his personal data in Form_step1. It gets data from column 1 to column 7 and then register.php inserts it to the database "users", table "data_users"
2) 2nd Step:
The user pays via banking or credit card through 2CheckOut.com and he has a "transaction number". This payment may be in the same or after the date of inserting his data in Step 1.
3) 3rd Step:
USer write the transaction and date of the transaction, and confirms his password and username in Form_step3, say, column 8 and 9. Then register.pho inserts it to the same database "users", table "data_users.
Is it possible to do it? Will it have problems because Form_step1 only sends data column 1 to 7 to a table that has 9 columns to be filled? And, how is it possible to insert column 8 and 9 to the same table? With "If else" command? Or must I create 2 different tables, one for column 1 to 7 and the other to columns 8 and 9? If so, how do I connect these 2 new tables?
Or maybe there is an easier way to do this Suscription proccess?
Thanks a lot for your patience and help.
Percy
something like
update data_users set transaction_number='x', date_transaction='y' where user_id='z';
obviously you would substitute x, y and z with their appropriate values