Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 267727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T23:35:48+00:00 2026-05-11T23:35:48+00:00

This is the error: Parse error: syntax error, unexpected ‘}’ in /home/idghosti/public_html/testground/mma/include/footer.php on line

  • 0

This is the error:

Parse error: syntax error, unexpected ‘}’ in /home/idghosti/public_html/testground/mma/include/footer.php on line 9

This is the code:

<?php
    } else {
        error_reporting(0);

        if  (mail($to, $subject, $msg, "From: $email\r\nReply-To: $email\r\nReturn-Path: $email\r\n"))

        //Message sent!
        //It the message that will be displayed when the user click the sumbit button
        //You can modify the text if you want
        echo nl2br("
        <div class=\"MsgSent\">
            <h1>Congratulations!!</h1>
            <p>Thank you <b>$name</b>, your message is sent!<br /> We will get back to you as soon as possible.</p>
        </div>
       ");

        else

        // Display error message if the message failed to send
        echo "
        <div class=\"MsgError\">
            <h1>Error!!</h1>
            <p>Sorry <b><?=$name;?></b>, your message failed to send. Try later!</p>
        </div>";
    }
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T23:35:48+00:00Added an answer on May 11, 2026 at 11:35 pm

    There are a few things wrong with your code. I recommend looking at some tutorials for IF statements to understand how they work. Here is a good web site for you to do this.

    http://www.tizag.com

    UPDATE to reflect comments:

    Take the PHP code block before the form and put it into toppart.php

    <?php if ($_SERVER['REQUEST_METHOD'] != 'POST'){ $self = $_SERVER['PHP_SELF']; ?> 
    

    ——————Your Form Code is here———————

    Take this PHP code block after the form and put it into middlepart.php

    <?php
    
    } else {
        error_reporting(0);
    
        if  (mail($to, $subject, $msg, "From: $email\r\nReply-To: $email\r\nReturn-Path: $email\r\n")) 
    
        //Message sent!
        //It the message that will be displayed when the user click the sumbit button
        //You can modify the text if you want
        echo nl2br("
        <div class=\"MsgSent\">
                <h1>Congratulations!!</h1>
                <p>Thank you <b>$name</b>, your message is sent!<br /> We will get back to you as soon as possible.</p>
        </div>
       ");
    
    
        else
    
        // Display error message if the message failed to send
        echo "
        <div class=\"MsgError\">
                <h1>Error!!</h1>
                <p>Sorry <b><?=$name;?></b>, your message failed to send. Try later!</p>
        </div>";
    
    
    } 
    
    
    ?>
    

    Your new code will look like the following:

    include 'toppart.php';
    
    /* Your Form Code Here */
    
    include 'middlepart.php';
    

    Unfortunately people on this web site will give you a hard time for posting questions such as these so it is good to do research before coming here for help. PHP coding can be very frustrating when you cannot figure out a problem. I am here to help. If you have any more questions feel free to leave a comment.

    Best of Luck!! Learning PHP can be very rewarding.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get this error... Parse error: syntax error, unexpected '{', expecting '(' in /home/content/s/k/y/skyview09/html/clients/Cheryl/admin/admin.php
The following code keeps giving me this error Parse error: syntax error, unexpected T_VARIABLE
I am seeing this error in a file called functions.php: Parse error: syntax error,
This error just started popping up all over our site. Permission denied to call
This error seems to just pop up now and again. It is not restricted
This error message appears on a colleague's machine when he tries to launch a
Came across this error today. Wondering if anyone can tell me what it means:
Has anyone run into this error message before when using a timer on an
I got this error today when trying to open a Visual Studio 2008 project
I get this error: Can't locate Foo.pm in @INC Is there an easier way

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.