I am using formmail by tactite to have the info submitted from my form get emailed to me. After the user hits the submit button, it goes to a “Thank You” page that by default just has some text, I’m trying to change that to load up a thank you page that I created and it doesn’t work, what am I doing wrong?
Thanks!
Here’s what doesn’t work:
// MSG_THANKS_PAGE is the default page that's displayed if the
// submission is successful
// Parameters: none
$aMessages[MSG_THANKS_PAGE] = load('http://nimbledesigns.com/kelsie/thankyou.html');
This is what i had there before that DOES work:
$aMessages[MSG_THANKS_PAGE] = 'Thanks!<br /><br />'.
'<a href="http://nimbledesigns.com/kelsie">Go Back</a>'.
'';
File_get_Contents()
use
instead.
Documentation
file_get_contents() – http://php.net/manual/en/function.file-get-contents.php
Alternatives
‘
If that file is on your server, then you may only need to do this:
That will stop PHP from using the HTTP stream connector and will use the File IO connector instead, which is going to be faster with less overhead (although the difference may only be viewable when your server is running slowly)
Redirects
You could also redirect them to the page, by issuing this command before you send any data to the browser:
This will redirect their browser to the file. Again assuming it resides on your server. You could replace that with a the full address if required
http://nimbledesigns.com/kelsie/thankyou.html