Skip to content Skip to sidebar Skip to footer

"parse Error: Syntax Error, Unexpected $end" For My Uni Registration Assignment

I am new to php so I used a Youtube tutorial to create this script, however the uploader seems to have disappeared so I cannot ask him any questions. My login form seems to work fi

Solution 1:

Try autoformating (auto-indent) your code. If you do not have an editor that allows that, get one such as Sublime Text or Notepad++. :-) It will save you a lot of time in similar situations; instead of trying to locate the problem in such situations, after autoformating problems will stare you in the face. :-)

I believe you are missing around six closing braces } (not sure I counted the number of unclosed ifs correctly) after the

{
    echo$form;
}

Obviously if this is the case something terribly wrong has happened and it may take more than putting some }s there to heal your code.

This could be a copy&paste problem. Maybe you did not copy the last few lines of the code you found in the Youtube tutorial you mention.

Solution 2:

Using any code editor with syntax highlighting (such as Notepad++) will clearly show you that you are missing a }.

Post a Comment for ""parse Error: Syntax Error, Unexpected $end" For My Uni Registration Assignment"