I have a form on our site that was generated using a free form builder. I'm trying to modify it to act slightly differently than its original method but my PHP skills are extremely limited. Here's what the form does: When someone fills out the form, the data is compiled and emailed to my designated email address. That's fantastic and it works perfectly. However, when someone clicks on the 'submit' button, it sends me the information, but on the user end, it refreshes the page and replaces the form with a 'thank you' message. That's nice, for what it was designed to do, but.... Here's what I want it to do: When someone clicks on the 'submit' button, I'd like it to send me the information as it is already, but instead of refreshing the page with a 'thank you' message, I'd like it to forward (onclick) to another website URL. I would appreciate it if one of you folks could tell me what I need to modify in the code in order for it to redirect the user to another URL after submitting information. To take a look at the form as it is now, you can view it at: http://wealthyambitions.com/form7.php and you can just right click to view source. Thank you very much in advance.
Just after the mail() section, add a PHP header to redirect to the new page: header("Location: yourpage.html"); PHP: That will auto-redirect once submitted. Thanks Andrew
It appears that I either did not place the code properly, or the code did not work. I've changed the URL to "page8.php" if you want to look at the source code. I've also started a new page for the code at http://wealthyambitions.com/form8.php (instead of form7.php) Thanks.