Forum Moderators: coopster
it's weather or not my mail thing works or not.
if it works I want it to go back to the main page and if it doesn't work I want it to go to an error page. or something... actualy if it doesn't work I don't know where I want it to go to lol.
Thank you in advance for any help.
<?php
# at contact.php
# --------------
/*
send mail successful with your code
and inmediatly after:
*/
header ('location: [mysite.com...]
exit;
/*
without footer of any kind! see the exit instruction.
*/
# at beginning home.php
# ---------------------
if (mailSendingOk == 1)
{
say 'thank you dear user.';
}
/*
continue displaying home content as always.
*/
?>
I use it always in pages with POST request method to avoid resubmitting of forms and that so very ugly pages and so commons like:
[3]Warning: Page has Expired[/3] The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you.
To resubmit your information and view this Web page, click the Refresh button.
What do you think?
I may have just not put the scritp in the right place on the emails page .I tryed a lot of deff. places with the same resuilts. Where you had the file highlighted in yellow i put in my page address mysite.com/main.html