Web Analytics Made Easy -
StatCounter Can't make sense of parse error. - CodingForum

Announcement

Collapse
No announcement yet.

Can't make sense of parse error.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can't make sense of parse error.

    Hi folks,

    For the life of me I can't find the issue. All my curly braces seem to be accounted for, yet the web server tells me that "Parse error: syntax error, unexpected '{' in bla\bla\feedout.php on line 32" So I guess the error is supposed to be on line 32 of my code but i can't see it. Any help is appreciated, my code is below.



    PHP Code:
                    <?php

                    $ip 
    $_POST['ip'];
                    
    $httpagent $_POST['httpagent'];
                    
    $httpref $_POST['$httpref'];
                    
    $serviceAddress $_POST['serviceAddress'];
                    
    $unitNumber $_POST['unitNumber'];
                    
    $firstName $_POST['firstName'];
                    
    $middleInitial $_POST['middleInitial'];
                    
    $lastName $_POST['lastName'];
                    
    $month $_POST['month'];
                    
    $day $_POST['day'];
                    
    $year $_POST['year'];
                    
    $telephoneNumber $_POST['telephoneNumber'];
                    
    $email $_POST['email'];
                    
    $mailingAddress $_POST['mailingAddress'];
                    
    $PAPP $_POST['PAPP'];
                    
    $driversLicense $_POST['driversLicense'];
                    
    $birthCertificate $_POST['birthCertificate'];
                    
    $ownRent $_POST['ownRent'];
                    
    $lawyerName $_POST['lawyerName'];
                    
    $lawyerAddress $_POST['lawyerAddress'];
                    
    $lawyerPhone $_POST['lawyerPhone'];
                    
    $landlordName $_POST['landlordName'];
                    
    $landlordAddress $_POST['landlordAddress'];
                    
    $landlordPhone $_POST['landlordPhone'];

                    
    $attn $_POST['attn'];
                    
                    
    $proof "yep";

                    if (empty(
    $driversLicense) && (empty($birthCertificate)){
                    
    $proof "";
                    }

                    if (
    eregi('http:'$comments)) { die ("Do NOT try that! ! "); }

                    if((!
    $email == "") && (!strstr($email,"@") || !strstr($email,".")))
                    {
                    echo 
    "<h2 style='color: red'>Use Back - Please enter a valid e-mail address</h2>\n";
                    
    $tellem "<h2 style='color: red'>Form was NOT submitted</h2>\n<br />";
                    
    $display_info "nope";
                    }

                    if(empty(
    $serviceAddress) || empty($unitNumber) || empty($firstName) || empty($lastName) || empty($telephoneNumber) || empty($email) || empty($proof)) {
                    echo 
    "<h2 style='color: red'>Use Back - Please fill in all required fields</h2>\n<br />";
                    
    $display_info "nope";
                    }

                    echo 
    $tellem;

                    
    $todayis date("l, F j, Y, g:i a") ;

                    
    $attn $attn;
                    
    $subject $attn;

                    
    $comments stripcslashes($comments);
                    
                    
    $thanks "<br /><h2 style='color: #7db435'>Thank you for sending us the information below</h2><br />";

                    
    $message "$todayis [EST] \n
                    From: \n 
    $firstName $middleInitial $lastName ($email)\n
                    Service Address: \n 
    $serviceAddress\n
                    Unit Number: \n 
    $unitNumber \n
                    Date service to begin at new address: \n 
    $month\\$day\\$year \n
                    Telephone Number: \n 
    $telephoneNumber \n
                    Email: \n 
    $email \n
                    Mailing Address: \n 
    $mailingAddress \n
                    Do you wish to be on our Pre-Authorized Payment Plan: \n 
    $PAPP \n
                    Ontario Driver's License Number: \n 
    $driversLicense \n
                    Birth Certificate: \n 
    $birthCertificate \n
                    Do you Own or Rent?: \n 
    $ownRent \n
                    Lawyer's Name: \n 
    $lawyerName \n
                    Lawyer's Address \n 
    $lawyerAddress \n
                    Lawyer's Telephone Number: \n 
    $lawyerPhone\n
                    Landlord's Name: \n 
    $landlordName \n
                    Landlord's Address \n 
    $landlordAddress \n
                    Landlord's Telephone Number: \n 
    $landlordPhone\n

                    IP Address: \n 
    $ip \n
                    "
    ;

                    
    $from "From: $email\r\n";
                    
    $subject "Move In Form";

                    
    mail("[email protected]"$subject$message$from);


                    
    $screenout str_replace("\n""<br/>"$message);
                    
    ?>

  • #2
    Your missing a parenthesis

    PHP Code:
    if (empty($driversLicense) && (empty($birthCertificate))){ 
    If you can't stand behind your troops, feel free to stand in front of them
    Semper Fidelis

    Comment


    • #3
      Thanks jimhill. You nailed it. And now that I see it, I'm pretty ticked that I missed it. Oh well. Good job, and Semper Fi good sir.

      Comment


      • #4
        We've all done it at one time or another lol. Glad I could help
        If you can't stand behind your troops, feel free to stand in front of them
        Semper Fidelis

        Comment

        Working...
        X