Hi,
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
exit;
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:
<?php
if(@$_REQUEST['success']){
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.
Thanks!
Greg
Greg Thomas
PHP Programmer - interactivetools.com