Enquiry form question

3 posts by 3 authors in: Forums > CMS Builder
Last Post: February 26, 2013   (RSS)

By mizrahi - February 26, 2013

Change the <form> "action" to the address of the page you want it to redirect to.

By gregThomas - February 26, 2013


Another way would be like this:

    redirectBrowserToURL('/newPage.php?success='.urlencode('Thanks for your enquiry. A representative will deal with your enquiry.'));
    $_REQUEST = array(); // clear form values

So at the point when the form has been filled out correctly, you could use the CMSB function redirectBrowserToURL() to send the user to the new page, and include a variable in the URL called success with the success message in.

Then on the page the browser is redirected to:

    echo htmlspecialchars($_REQUEST['success']);

So this statement checks if there is variable called success in the url, and if there is it displays its contents. 

Let me know if you have any questions.



Greg Thomas

PHP Programmer - interactivetools.com