Jump to content

PHP Parse error: syntax error


m1k3yb0y

Recommended Posts

Hey guys! Since my previous post, I got me some new and better hosting for my website. :hail_freaks: Now I am getting my simple contact form set up on it....and...well, when I submit my contact info, I get a 500 Internal Server error which my browser think it is so it shows its own version of the error. :facepalm:

I looked at my error log and this is what it came up with:

 

"PHP Parse error:  syntax error, unexpected '}' in /var/www/contact0.php on line 662, referer: http://www.mikeytatelive.com/contactform.php"

 

Anybody know how to fix that problem? Thanks in advance!

Link to comment
Share on other sites

<title>Contact Mikey Tate - MikeyTateLive.com</title>
<html>
<body bgcolor="333333" text="FFFFFF">
<div id="wrapper">
<div id="pictureWrapper">
  <p align="center">
  <font size="55">Mikey&#8217;s World
  </font>
  </p><br/><br/><br/>
  </div>
    <div id="maincontent">
      <h2>Not quite ready yet!</h2>
      <p>
      $field_name = $_POST['cf_name'];
      $field_email = $_POST['cf_email'];
      $field_message = $_POST['cf_message'];
      $mail_to = 'tate.mikey@gmail.com';
      $subject = 'New Message from ' . $field_name;
      $body_message = 'The following person, '.$field_name."has sent you a message via your contact form on MikeyTateLive.com. \n";
      $body_message .= 'The message reads: '"\n".$field_message."\n";
      $body_message .= 'Here is the sender&#8217;s email address in case if you would like to reply to him/her: '.$field_message;
      $headers = "From: $cf_email\r\n";
      $headers .= "Reply-To: $cf_email\r\n";
      $mail_status = mail($mail_to, $subject, $body_message, $headers);
      if ($mail_status) { ?>
    <script language="javascript" type="text/javascript">
        // Print a message
        alert('Your message has been sent. Thank you! I will contact you soon.');
        // Redirect to some page of the site. You can also specify full URL, e.g. http://template-help.com
        window.location = 'http://www.mikeytatelive.com/';
    </script>
<?php
} //this is where the error comes from
else { ?>
    <script language="javascript" type="text/javascript">
        // Print a message
        alert('I am sorry. Your message could not be sent. Please try again.');
        // Redirect to some page of the site. You can also specify full URL, e.g. http://template-help.com
        window.location = 'http://www.mikeytatelive.com/';
    </script>
<?php
}?>
    </p>
    </div>
    <div id="footer">
    <p align="Center">©<?php echo date('Y');?> MikeyTateLive Productions Inc.<br/>
    <?php echo date('D, F d, Y - h:i:sa');?><br/>
    Timezone is UTC-1 Greenwich Time</p>
    </div>
</div>
</body>
</html>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.