parse error - php form script unexpected $end parse error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mikeinspain
    New Member
    • Jan 2007
    • 21

    parse error - php form script unexpected $end parse error

    Keep getting this error!

    Parse error: syntax error, unexpected $end in /home/9144/domains/cbweb.co.uk/html/faq_finance.php on line 139

    PHP Below.. Script was working 1 minute and copied the script from another file that was working great.

    [PHP] elseif (!trim($name)) {
    echo "<p>Ooops!, it appears that you did not enter a Name</p><p><a href='javascrip t: history.go(-1)'>Click here to go back</a>.</p>";
    } [/PHP]

    Any help appreciated??

    Cheers

    Mike
  • Motoma
    Recognized Expert Specialist
    • Jan 2007
    • 3236

    #2
    Originally posted by mikeinspain
    Keep getting this error!

    Parse error: syntax error, unexpected $end in /home/9144/domains/cbweb.co.uk/html/faq_finance.php on line 139

    PHP Below.. Script was working 1 minute and copied the script from another file that was working great.

    [PHP] elseif (!trim($name)) {
    echo "<p>Ooops!, it appears that you did not enter a Name</p><p><a href='javascrip t: history.go(-1)'>Click here to go back</a>.</p>";
    } [/PHP]

    Any help appreciated??

    Cheers

    Mike
    Care to post a little more code? I don't see a $end in that block.

    Comment

    • mikeinspain
      New Member
      • Jan 2007
      • 21

      #3
      Its ok.. I think I have fixed it, but not quite sure how??

      Mike

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        This error is caused because you did not close a quote, a parenthesis or a curly brace. But you fixed it seemingly unconsciously.

        Ronald :cool:

        Comment

        • Motoma
          Recognized Expert Specialist
          • Jan 2007
          • 3236

          #5
          Originally posted by ronverdonk
          This error is caused because you did not close a quote, a parenthesis or a curly brace. But you fixed it seemingly unconsciously.

          Ronald :cool:
          You're right Ronald! I completely overlooked that possibility because of the $ in front of the word end.

          Comment

          Working...