Hi There -
Am building an application and I have nested if statements and I've been chasing a bug for hours and hours and I've been working around this problem so long I can't think straight anymore. I need someone with fresh eyes to have a look at this.
I keep getting the same error - and the line number lands right in the middle of an html form.
Parse error: syntax error, unexpected '}' . . . in line 141.
It's telling me that I have an extra }, when I feel like I'm missing one. (I'm thinking I'm missing one to close the first if statement.)
I have five if statements. The very last one gives a fresh login screen. All of the others should occur if the login has been filled out. Should the first four be enclosed in the first if statement? If so, where do I put the bracket for the first? At the end of the fourth?
Here's the structure minus the code. I'm hoping that someone can see where I'm going wrong.
Thanks,
Lee
/********************* IF THE PASSWORD HAS ALREADY BEEN ENTERED *********/
if (isset($_POST['entered_Password'])) {
// MAKE POST VARIABLES INTO SCRIPT VARIABLES
// QUERY STRING
// PROCESS RESULTS
/********************* CHECK IF LOGIN INFO IS CORRECT *******************/
if ($entered_Password == $cust_Password AND (($cust_Fname != NULL) OR ($cust_Lname != NULL))) [B]{[/B]
echo("You are logged in as $cust_Fname $cust_Lname. <br><br>");
// REGISTER SESSION VARIABLES
[B]}[/B]
/********************* IF LOGIN INFO IS INCORRECT INCREMENT THE LOCKOUT NUMBER, AFTER THREE TRIES, THEY'RE LOCKED OUT /
else if (($entered_Password !== $cust_Password) AND ($locked_num < 3)) [B]{[/B]
// SHOW THE FORM AGAIN
[B]}[/B]
/********************* IF LOCKED OUT *************************************/
else if ($locked_num > 3) [B]{[/B]
// TELL THEM THEY'RE LOCKED OUT AND SET LOCKED FLAG IN DATABASE
[B]}[/B]
/********************* IF NO PASSWORD ENTERED YET (FRESH LOGIN SCREEN) **/
else [B]{[/B]
// GIVE THEM THE VIRGIN LOGIN SCREEN
[B]}[/B]