English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Hi all,

I have created a form in html (Dreamweaver) and have connected it to database.
There is a submit button in form and having some problem in redirecting the page.
I want, when user clicks on “Submit” button the page should redirect to confirmation page.
Example: “Your information is saved in our database.”

How can I do this in Html or in javascript?

Thanks,
Rex

2007-02-21 00:22:20 · 4 answers · asked by rex 1 in Computers & Internet Programming & Design

4 answers

What you need is a PERL or PHP or ASP page to accept the data, and stuff it into your database. You might have notices results pages that end in .cgi or .php or .asp

So let's say that your Form has a field that is named COMMENTS. On the results code, you have to get the COMMENTS field data, then copy it into your database.

You will have to learn one of those languages, depending on what language that your webserver supports.

Good luck and Happy Computing!

2007-02-21 00:30:59 · answer #1 · answered by Anonymous · 0 0

You actually want to do several things when the 'Submit' button is clicked. You want to 'update the database', verify the update and then redirect to your confirmation page. When you click the submit button it executes an action of sometype on another page/document/file. You should place the code for the 'Call' to the redirect page in that page/document/file.

Hopefully this will point you where to place the code, however I code all my pages with Notepad and use ASP for the 'fancier' stuff. So with knowing what the pages are written in or how dreamweaver works that's all the help I can give.

Maybe if you provide a link to the webpage I can assist farther.. if no one else gives the answer your looking for.

Good luck!
me@rustykey.com

2007-02-21 00:30:06 · answer #2 · answered by wrkey 5 · 0 0

Usually this is done by submitting the form to an asp page that has all the code for adding the record to the database and the HTML of a confirmation page.

2007-02-21 00:28:30 · answer #3 · answered by blndchik 5 · 0 0

Since there's a form, all you have to do is to add a "action" attribute into the form head.

What language are you using?
If you're using PHP.. your page with the form (lets say 'form.html') will send the information to the confirmation page (lets say 'confirm.php'). Where in the confirmation page is the place where it process the information from the form into the database. Likewise, stating down, “Your information is saved in our database.” Make sure you connect to your database as well on the confirmation page.

Do this example on form.html, in your form section:


...
...


do a if-else loop in confirm.php to check whether information are being saved, if yes, display that message. :)

goodluck!

2007-02-21 00:38:06 · answer #4 · answered by freshie_minth 1 · 1 0

fedest.com, questions and answers