Announcement

Collapse
No announcement yet.

Form - Parse error: syntax error, unexpected T_STRING

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

  • Form - Parse error: syntax error, unexpected T_STRING

    Set up a php page with a form.
    The english page works fine.


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



    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
    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

    Comment


    • #3
      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.



      thanks

      Comment


      • #4
        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

        Comment


        • #5
          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

          Comment

          Working...
          X