Parse error: parse error, unexpected T_STRING error

Discussion in 'PHP' started by ethikz, Aug 22, 2011.

  1. #1
    I need some help please. This is a contact form and after hitting submit I get the error "Parse error: parse error, unexpected T_STRING in /www/xxxxxx/contact/contactsetting.php on line 10"

    Line 10 is the save_path code.

    <?php
    
    $replyto='support@xxxxxxx.com;
    
    $uploadpath='/contact/uploads/';
    
    $save_path ='http://'.$_SERVER['SERVER_NAME'].$uploadpath; 
    
    switch ($subject) {
    case "Support":
    $toemail='support@xxxxxxx.com';
    break;
    }
    
    $autorespond="no"; 
    
    ?>
    
    Code (markup):

     
    ethikz, Aug 22, 2011 IP
  2. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #2
    If you used an editor that colored the syntax, you would have noticed that you missed a closing quote in

    $replyto='support@xxxxxxx.com;

    Make it

    $replyto='support@xxxxxxx.com';

    The error rippled down and was caught in a line that has nothing to do with the error message.
     
    Rukbat, Aug 22, 2011 IP
  3. ethikz

    ethikz Peon

    Messages:
    92
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Wow I didn't even realize it and I looked at it for about 30 minutes lol.

    Yea I didn't think about using a text editor, I just used the editor in Transmit (my ftp program)

    Thanks so much
     
    ethikz, Aug 22, 2011 IP