By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,722 Members | 1,904 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,722 IT Pros & Developers. It's quick & easy.

Can php form data be saved into a MySQL database?

P: 5
I've tried to find a decent guide online as to how to do this, but all I run into is software.

Basically I have a form that once submitted, produces calculations on the output page based on inputs.

I want to have it give users a # after they submit it, that will let them recall the data they submitted for future review. Is this a possibility? If so, can anyone provide a good guide? Thanks :)

Ex, User inputs data, hits submit, is sent to output page, and provided with a unique number (i.e. 2033) Next day, user wants to look at the output again, so he inputs the #2033 in a box on the main page, hits submit, and the data is retrieved from the database.
Feb 27 '07 #1
Share this Question
Share on Google+
1 Reply


100+
P: 170
Well I presume that part of the output page would contain php code to INSERT the submitted values and calculations and unique value into the mysql table. The output page would give the user his number: 2033.

Then the next day he comes back and types 2033 into the text box of another page you have. But that page, when submitted, does a SELECT from the mysql table. Along the lines of "select * from your_table where unique_number = '$unique_number' " (Of course $unique_number = $_POST['unique_number'].) And then that will output his data in whatever format you decide.

That should work...
Feb 27 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.