What I usually do for a situation like this is...
1) User fills out form and data is INSERTed into the table. If you use
auto_increment for the row id, use PHP's mysql_insert_id to get the id and
use this for step 2.
2) Page confirms data by SELECTing the data from the MySQL table and
inserting it into the form.
3) If the user makes changes, it is UPDATEd in the MySQL table.
I hope this is clear.
> Hi all,
> I have a form that when populated and submitted is entered into a MySQL dB.
> What I would like to do is be able to present the submitter with a
> confirmation page listing the information from the form and then ask them to
> confirm their submission. Also, if there is a problem or want to change
> something, they can use the browser back button to go to the previous page and
> make corrections.
> At first I thought that using Sessions to add the form values would allow this
> to work.. I have gone threw this twice since last night and find that my logic
> is flawed... It works once... then when another submissions is attempted the
> process hangs and returns a CGI timeout.
> I am by no means a newbie but obviously I am not doing something right with
> regards to session use. So I ask you more knowledgeable then I for your input
> and advise. In hind sight I think my problem is that once the information is
> confirmed and supposed to be entered into the dB I am not destroying the
> session... Like I said, I think my approach is all wrong here. I already have
> a login routine that uses sessions and works flawlessly..[at least in
> Any help would be very much appreciated.
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php