The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Contact form stopped working

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #31831

    So My contact form was working fine for awhile and for some unknown reason it stopped working. I am pretty sure I have not altered the php at all and everything looks to be in order. Any suggestions are much appreciated.

    Here is the php:

    $name = $_REQUEST ;
    $email = $_REQUEST ;
    $comment = $_REQUEST ;

    mail( "[email protected]", "Feedback Form Results",
    $comment, "From: $email" );
    header( "Location:" );

    here is the markup:

    here is the page:

    page with contact form


    Not sure if this will make a difference, but in your PHP you are grabbing the form values using $_REQUEST. Your form is set to method=”post” — meaning you should maybe be using the $_POST option instead?

    $name = $_POST ;
    $email = $_POST ;
    $comment = $_POST ;


    You should write conditions to make sure things are working.

    if(mail(...)) {all good}

    Or look elsewhere in your page, sometimes it’s not related to that part.


    Thanks for the responses, So I made the changes suggested and I get served this message when completing the form now:

    Parse error: syntax error, unexpected ‘;’ in /home/content/p/k/i/pkinchla3345/html/contact.php on line 7

    So I should assume the error is in line 7 I guess? Sorry Php is realllly new to me.


    Hey dude

    PHP is new to me too. One thing I have heard is to stay away from $_REQUEST.

    Also if the error is on line 7 its worth looking at line 6.

    Sorry I couldnt help more but like you Im still learning.


    Could you post what your contact.php code looks like now?


    Yeah I have made some changes and got it too work I think here is the code again:

    $to = "[email protected]";
    $subject = $_POST ;
    $email = $_POST ;
    $comment = $_POST ;
    $headers = "From: $email";
    $sent = mail($to, $subject, $comment, $headers) ;
    {print "Your mail was sent successfully"; }
    {print "We encountered an error sending your mail"; }

    I also changed the markup slightly:

    It seems that some go through and some do not at varying timeframes that I receive them in my email.

    Thanks again for all the help!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Back End’ is closed to new topics and replies.