Well, actually, you have dozens of syntax errors in this code. Some of these actually work for you because they are archival versions of today’s PHP syntax. I would suggest you fix these to be more standard. The reason this is important is for others who must view your code. (Not really for your own use!) So, I will cover each error and explain each. (Some are duplicates.)
First, when using an “IF” clause, you really need to use the braces. { } It makes IF’s so much easier to read and is the current standard. So, an IF clause like this:
If (A==B)
echo “same”;
else
echo “different”;
Will work and execute correctly. But, the syntax is not correct for current standards. It would be like this:
if (A==B) {
echo “same”;
}else{
echo “different”;
}
Now, I realize this is a small difference in this example, but, when you get a large number of nested IF clauses, it is much more readable. Normally most programmers will indent the IF’s and so if an second IF is inside another, they are indented further. This make it much easier for someone else to read.
Next, in your “register-now” function, you never close the function. This can cause a lot of problems and errors that may not show up till later in the code. My guess is that this is your main error. You need to add a “}” in line 25.
Normally, it good structured programming code, you place ALL of your functions at the top of the class and then any actual code is after those functions. You have a lose line of code at line 41. Okay, after reading the entire code, I see where you create classes and several function in these classes. But, the functions are only used one time, hence the odd code between each function. You should study up on functions. They are usually only created if they are needed more than once and quite often are passed options or arguments. It is a waste of code to create one, use it once and then never call it again. So, most of your functions should just be straight code instead.
Now, counting all of the braces you used, “{” “}”, I found that line 94 and 95 are not needed. They do not match up with starting braces anywhere…
Your “login” class has code, then functions, then more code. Again, in a class it is best to place all of your function at the top of the class and then the code and the code that calls the functions…
This “loginnow” function does not end. Line 114 should be a “}”.
Line 148 is an extra “}” and should be deleted…
Line 157 is an extra “}” and should be deleted…
Well, so yes, you were right! You had a missing brace and a few extras… And, a few syntax issues…
But, basically all else seems to look good although I did not test it live.
Good luck, hope this helps. Let us know if you solve it…