Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ']' in /h

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • karine
    New Member
    • Jul 2010
    • 1

    Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ']' in /h

    Hi, I keep getting this error message "Parse error: syntax error, unexpected T_CONSTANT_ENCA PSED_STRING, expecting ']' in /home/env49986/public_html/welcome.php on line 16"

    below is the code
    Code:
    @$pfw_ip= $_SERVER['REMOTE_ADDR'];
    @$name = addslashes($_POST['name']);
    @$company_name = addslashes($_POST['company_name']);
    @$Number = addslashes($_POST[Number']);
    @$address = addslashes($_POST['Address']);
    @$Suburb = addslashes($_POST['Suburb']);
    @$State = addslashes($_POST['State']);
    @$Post_Code = addslashes($_POST['Post_Code']);
    @$Phone = addslashes($_POST['Phone']);
    @$Web_Address = addslashes($_POST['Web_Address']);
    @$email = addslashes($_POST['Email']);
    @$hdcaptcha = addslashes($_POST['hdcaptcha']);
    @$hdwemail = addslashes($_POST['hdwemail']);
    @$hdwok = addslashes($_POST['hdwok']);
    @$hdwnook = addslashes($_POST['hdwnook']);
    @$hdwfail = addslashes($_POST['hdwfail']);
    line 5 is line 16 the error refers to, got a deadline, new at PHP, please help
    thank you
  • johny10151981
    Top Contributor
    • Jan 2010
    • 1059

    #2
    check line 15, here line 4.

    your code is
    Code:
    @$Number = addslashes($_POST[Number']);
    put a ' before Number
    Last edited by Dormilich; Jul 22 '10, 11:34 AM. Reason: spelling

    Comment

    Working...