Forum Moderators: open
1. Create a page that collects all the form data so that the customer could verify the information. The page will be named "verify.html". On that page, have two links (yes/no): if the customer selects yes, it will link you to page "thanks.html"...if he selects no, it will take you back to the form.
I thought I wasn't going to have a problem with the links, however, when I click on the submit button, I receive a blank page with HTTP Error 405, besides the fact that I don't have a clue on how to collect the data from the form and have it displayed on "verify.html". On the action I put action="verify.html", but as usual, there's gotta be a trick to make it work. Here's where I need your help!
Here's the script on the original form that once the customer hits submit will link to "verify.html":
<form name="form" method="post" action="verify.html" onSubmit="return validateForm(form);">
Here's the script on "verify.html" with two links that either will take me back to the original form, or will send the info to "thanks.html" for submission:
<h1 align="center">Please verify your information</h1>
Thank You for shopping at my store...
<font size="5"></font>
<p>
<a href="http://www.example.com/creep/f_mueses/Proyecto1/form.html">No, the information is incorrect, take me back to the form!</a><br>
<p>
<font size="5"></font>
<p>
<a href="http://www.example.com/creep/f_mueses/Proyecto1/thanks.html">Yes, the information is correct and ready for submission!</a><br>
<p>
</body>
</html>
What I am missing to make it work?
[edited by: korkus2000 at 6:30 pm (utc) on May 6, 2004]
[edit reason] examplified URL [/edit]
First, the syntax of your form is wrong. "a href" tags are not used in a form; instead form elements such as text boxes and radio buttons are used. I would recommend radio buttons for this application:
<input type='radio' name='yes_no' value='yes'>Yes the information is correct!<br>
<input type='radio' name='yes_no' value='no'>No, take me back to the page.<br>
<input type='submit'>
Second, the action can't be a regular html page, it must be a CGI page of some sort, either using PHP, or Perl, or whatever your web programming language of choice is. That page must then extract the values passed by the form and act on them: either redirecting the user back to the form page in the case of a "no" answer, or recording the information and thanking the user in the case of a "yes" answer.
Two books that I recommend you look into that will get you up and running in no time are Peachpit Press' Visual Quickstart Guides "HTML" and "Perl for the WWW". Lots of pictures and examples, easy to understand, and you can get your page working in an hour, tops.