Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Contact form stopped working [was: email forum]

Community Beginner ,
Apr 04, 2018 Apr 04, 2018

Hey again, I didnt want to post anything else here cuz people have helped me so much already.

Ive been trying for hours to figure this out, I got it working before but now its suddenly not working

The email form doesn't work anymore This is supper annoying as this is how my clients reach me. I dont know how many lost emails I have

Anyway, the email form used to work, and now it just doesn't. It says the email has been sent successfully, but no email gets sent to my account.

Any ideas?

my site is: theosparks.co.uk

Thank you guys, your the best.

1.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 05, 2018 Apr 05, 2018

There should be error messages somewhere, if it truly is not working.  Error console in the browser (F12 for most browsers).  Error log in the Apache logs.  Something displayed in the browser screen.  Something indicating where the trouble is.

Another thing that makes me curious is:  is the form located in the same folder as the action page (contact_me.php), or one level up?  But then if it were not just outside your "mail" folder, you'd be getting a "page not found" error, so I'm going to assume

...
Translate
Community Expert ,
Apr 04, 2018 Apr 04, 2018

Looking at line 317 of your code, I see a form, but I don't see any action to your form.  Based on the comments I see in the code, you should have a form action defined that points to the URL of your PHP processing script.  There's likely just a simple javascript that is clearing the form and displaying the confirmation div so you see the message and the form clears, but this is why nothing is happening on the backend.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 04, 2018 Apr 04, 2018

Okay, thank you for looking over it for me.

So do you know what form action and how to point it to the PHP script? I don't know how its disappeared, like I said it used to work.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 04, 2018 Apr 04, 2018

theos71901143  wrote

Okay, thank you for looking over it for me.

So do you know what form action and how to point it to the PHP script? I don't know how its disappeared, like I said it used to work.

Look at line 315 of your code.  It appears you copied in the form code from somewhere because of the instructions there telling you to edit line 19 of your PHP document to tell the script where to send the email to.  Just make the form's action that PHP file.  I am assuming there is also somewhere in that document that will tell you where to have the form submitter redirected after it is complete.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 04, 2018 Apr 04, 2018

Heya, I understand what your saying and I think it makes sense. So I need to link this form to the php file somehow? In the php file I have already included my email address in the correct place, so thats already done.

How exactly to I make the forms action the php file?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 05, 2018 Apr 05, 2018

heya, sorry i accidentally marked this as answered somehow, still cant figure this thing out.

I understand what your saying and I think it makes sense. So I need to link this form to the php file somehow? In the php file I have already included my email address in the correct place, so thats already done.

How exactly to I make the forms action the php file?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2018 Apr 05, 2018

For the form tag you are missing action="".  Inside the quotes should be the path to the PHP file.  That will execute the PHP file when the form is submitted.  If you don't feel comfortable editing the code, I would highly recommend looking into form solutions.  There are simple ones like wufoo ( Online Form Builder with Cloud Storage Database | Wufoo​ ) that give you the exact code to copy/paste into your website to make forms work without having to go into the code view.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 05, 2018 Apr 05, 2018

Heya, I tried this, I added action="mail/contact_me.php" to the other bits at the top of the form, so it looked like this:

<form name="sentMessage" id="contactForm" action="mail/contact_me.php" novalidate>

Still nothing Am I doing something wrong?

When I get this problem fixed, I will look into alternative ways to make my website as I dont know anything about code.

Thank you for all your help so far.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2018 Apr 05, 2018

Saying it doesn't work doesn't help us to help you.

Did you upload the revised form and script (mail/contact_me.php) to your server ?

Are you testing the form on the live site and not locally?

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 05, 2018 Apr 05, 2018

No I upload it to the server every time I test it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 05, 2018 Apr 05, 2018

There should be error messages somewhere, if it truly is not working.  Error console in the browser (F12 for most browsers).  Error log in the Apache logs.  Something displayed in the browser screen.  Something indicating where the trouble is.

Another thing that makes me curious is:  is the form located in the same folder as the action page (contact_me.php), or one level up?  But then if it were not just outside your "mail" folder, you'd be getting a "page not found" error, so I'm going to assume that the hierarchy is proper.

V/r,

^ _ ^

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 06, 2018 Apr 06, 2018
LATEST

Oh, and one more thing.

If you are basing your allegation of it not working purely on the fact that it says the email was sent, but you don't receive the email, then the issue may not be your code, it could be your email server, or something that happens AFTER the email is successfully sent.

Just a thot.

V/r,

^ _ ^

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2018 Apr 05, 2018

<form action="[actionfile.php]" method="post"  name="sentMessage" id="contactForm" novalidate>

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 05, 2018 Apr 05, 2018

I tried this, I replaced this:

<form name="sentMessage" id="contactForm" novalidate>

with this:

<form action="mail/contact_me.php" method="post"  name="sentMessage" id="contactForm" novalidate>

I tried a few variations and nothing worked

Thank you though

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 04, 2018 Apr 04, 2018

Contact your web host and ask them which form-to-email processing scripts you can use with your hosting plan.   Some hosts have scripts already installed on their servers that you can activate from your server's admin panel.    If your host doesn't support scripts,  you could use a service like Wufoo.com

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 04, 2018 Apr 04, 2018

Heya Im not sure if its a server issue, I had a problem with the email form ages ago and phoned them up and they said theres no reason it shouldn't work on their end, and that they cant help me with the code for my website.

In the end I got it working and it had nothing to do with the server. I only noticed this isnt working after updating my website so I guess something I did messed something up.

But thank you

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines