I have the following situation. I have a form, written in Perl, CGI, HTML and Javascript. When this form is submitted, a javascript function verifies the validity of the information on the form. If this passes, it calls another Perl, CGI, HTML page which displays the information for the user to verify manually. At the bottom is a Submit and Back button. The Back button brings the user back to the form to change data. Everything up to here works fine.
When the Submit button is clicked, I want to Insert the values I now have stored in Perl variables into a MySQL database.
I don't know the best way to do this. Is it possible that I can write a Perl subroutine on the verification page that will Insert the data, and call this from ACTION in the FORM tag?
If not, can I call another Perl, CGI page to pass those variables and run the Insert on this new page? If so, how does that work, meaning how do I pass the variables?
Or, do you have any other suggestions?
One thing to note is that I already have the INSERT feature working when the verification page is loaded. When the user submits the form and it opens the verification page, I have the Perl script inserting the values into the database automatically. But, I want this to happen if and only if the user clicks submit.
Thanks!
When the Submit button is clicked, I want to Insert the values I now have stored in Perl variables into a MySQL database.
I don't know the best way to do this. Is it possible that I can write a Perl subroutine on the verification page that will Insert the data, and call this from ACTION in the FORM tag?
If not, can I call another Perl, CGI page to pass those variables and run the Insert on this new page? If so, how does that work, meaning how do I pass the variables?
Or, do you have any other suggestions?
One thing to note is that I already have the INSERT feature working when the verification page is loaded. When the user submits the form and it opens the verification page, I have the Perl script inserting the values into the database automatically. But, I want this to happen if and only if the user clicks submit.
Thanks!