Php - Mysql form with a preview button?
Posted: Thu Apr 12, 2007 8:15 pm
Hey.
I have a php form that adds data to a mysql database but I need some pointers how to go about adding a preview button to the form.
I understand how to check wether the submit button is pressed or wether the preview button is pressed but what I dont get is how to show the user their preview data without losing all the data from the forms themselves.
As far as I know, whenever a form is submitted the page is refreshed so all of the data on the forms would be lost.
Should I somehow save this data and reinsert it to the editable forms, while also showing the data as it would appear as text?
im pretty lost on this right now...
how have others done it in the past?
any help is appreciated... thanks!
I have a php form that adds data to a mysql database but I need some pointers how to go about adding a preview button to the form.
I understand how to check wether the submit button is pressed or wether the preview button is pressed but what I dont get is how to show the user their preview data without losing all the data from the forms themselves.
As far as I know, whenever a form is submitted the page is refreshed so all of the data on the forms would be lost.
Should I somehow save this data and reinsert it to the editable forms, while also showing the data as it would appear as text?
im pretty lost on this right now...
how have others done it in the past?
any help is appreciated... thanks!