Question: Please, i need some help with some code I AM GETTING THIS ERROR.. Parse error : syntax error, unexpected '}' in E:xampxampphtdocsWebtechcourseworkChapter14Modify5.php on line 58
Please, i need some help with some code
I AM GETTING THIS ERROR..
Parse error: syntax error, unexpected '}' in E:\xamp\xampp\htdocs\Webtech\coursework\Chapter14\Modify5.php on line 58
This should be the output...

CODE
Modify 5
Modify 5
$server = "localhost"; $user = "wbip"; $pw = "wbip123"; $db = "test";
$connect=mysqli_connect($server, $user, $pw, $db);
if( !$connect) { die("ERROR: Cannot connect to database $db on server $server using user name $user (".mysqli_connect_errno(). ", ".mysqli_connect_error().")"); } else { $userQuery = "SELECT COUNT(lastName) FROM personnel WHERE jobTitle='cleaner'";
$result = mysqli_query($connect, $userQuery);
if (!$result) { die("Could not successfully run query ($userQuery) from $db: " . mysqli_error($connect) ); }
if (mysqli_num_rows($result) == 0) { print("No records found with query $userQuery"); } else { print("
SALES STAFF REPORT
"); while ($row = mysqli_fetch_assoc($result)) { print ("
Number of cleaners: ".$row['COUNT(lastName)']."
");
} THIS IS LINE 58, I CANT FIGURE OUT WHAT THE PROBLEM IS.
} mysqli_close($connect); // close the connection } ?>
5. Modify 5.php output Modify 5 SALES STAFF REPORT There are 4 sales staff
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
