Results 1 to 5 of 5

Thread: Form - Parse error: syntax error, unexpected T_STRING
      
   

  1. #1
    Alter Ego is offline Private First Class
    Join Date
    Jan 2009
    Posts
    9

    Smile Form - Parse error: syntax error, unexpected T_STRING

    Set up a php page with a form.
    The english page works fine.
    http://www.alteregoimpartition.com/contact-us.php

    Problem with the French equivalent page. The links are all fine and there is no html corresponding page.

    http://www.alteregoimpartition.com/nous-joindre.php

    Following error message:
    Parse error: syntax error, unexpected T_STRING in /home/hgkhsqrq/public_html/nous-joindre.php on line 15

    Gone through all Forms threads, did not find answer.
    Did use the wizard to create page.

    Thanks!!

    Pierre

  2. #2
    Watdaflip's Avatar
    Watdaflip is offline Major General
    Join Date
    Sep 2005
    Location
    Cincinnati, Ohio
    Posts
    2,119

    Default Re: Form - Parse error: syntax error, unexpected T_STRING

    What php code did you insert at the beginning of the page (lines 1-16.. or the line it starts on to line 16)?

    Register/Login Script
    Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

  3. #3
    Alter Ego is offline Private First Class
    Join Date
    Jan 2009
    Posts
    9

    Default Re: Form - Parse error: syntax error, unexpected T_STRING

    i did not insert any code manually.
    I guess the error was inserted by the wizard.

    I tried deleting the line at one point, did not change anything.

    http://www.alteregoimpartition.com/nous-joindre.php

    thanks

  4. #4
    Watdaflip's Avatar
    Watdaflip is offline Major General
    Join Date
    Sep 2005
    Location
    Cincinnati, Ohio
    Posts
    2,119

    Default Re: Form - Parse error: syntax error, unexpected T_STRING

    Did any of the settings you applied through the wizard have an apostrophe (') or a quote (") in it? Perhaps the wizard does not properly escape them which is causing an error.

    In PHP a string is formatted like
    $string = "This is a string";

    If one of your settings has a quote in it, it will make it something like

    $string = "This is my string with a " in it.";

    The string ends with your quote and then has the text ( in it."; ) that is just there, which causes an error.

    Bear in mind it will most likely be caused by either a ' or a ", so if you have "\" in your text you should be able to figure out which one it is.

    Register/Login Script
    Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

  5. #5
    Alter Ego is offline Private First Class
    Join Date
    Jan 2009
    Posts
    9

    Default Re: Form - Parse error: syntax error, unexpected T_STRING

    Started the page from scratch.
    Made sure everything was according to specs and it worked. Problem solved.
    It is just possible that I had created and deleted forms a few time on that page and there was probably some latent code.

    Thanks for your help.

    Pierre

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49