|
|
#1 |
|
New Member
![]() Join Date: Dec 2011
Posts: 15
|
I am using WAMP and everything works fine on it (including other PHP files). When I fill out the form properly, I do get redirected to the right page, which says:
"Your message was sent Your message was successfully sent! Thank you for contacting us, we will reply to your inquiry as soon as possible!" However, for some reason, I am not receiving an email after completing the form. Here are the files I'm using: contact.htm: http://pastebin.com/nE18nkWZ contact.php: http://pastebin.com/yQv6uHWy thanks.htm: http://pastebin.com/L2Ln3fB8b The exact same problem occurs with this set of files: contactform.htm: http://pastebin.com/ED4eqCZ9 send_form_email.php: http://pastebin.com/m6T5LKtv I did fill out my email properly in the PHP files. Thanks a lot for any help |
|
|
|
|
|
#2 |
|
Gold Member
![]() Join Date: Feb 2011
Location: Australia
Posts: 369
|
You can put this in your code to show if there are any PHP errors:
Code:
// Report all PHP errors error_reporting(-1); Then you can put in a redirect for a faulted attempted. Such as: Code:
if(mail($myemail, $subject, $message)) {
/* Redirect visitor to the thank you page */
header('Location: thanks.htm');
exit();
} else {
/* Redirect visitor to the error page */
header('Location: failed.htm');
exit();
}
Hope that helps.
__________________
Jason H. DHDdirect.com Domains - Hosting - Design Last edited by DHDdirect; 12-10-2011 at 09:42 AM. |
|
|
|
|
|
#3 |
|
Silver Member
![]() Join Date: Aug 2011
Posts: 187
|
Okay. You are using WAMP a local server. To get it to work upload it to a live website. Problem should be solved
|
|
|
|
|
|
#4 |
|
New Member
![]() Join Date: Dec 2011
Posts: 15
|
Well turns out it does work on my website.. Thanks so much. and I'll remember the error reporting code too
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|