need some help with the code below. This the part of a php code to check if the combination of the user ID and encrypted password are already in the database. So when I run the code with Xampp, an error - Parse error: syntax error, unexpected '}' occurred.
<?php
//Determine if the User ID and password are on file.
$row = mysql_fetch_object($result);
$db_userid = $row->admin_id;
$db_password = $row->admin_password;
$name = $row->admin_name;
if($db_userid != $userid || $db_password != $encryptpasswd){
//If not on file, add record to administrator table.
$query = "INSERT INTO administrator(admin_id, admin_password, admin_name)
VALUES('$userid','$encryptpasswd','$name')";
$result = mysql_query($query)
or die("Insert to administrator failed." . mysql_error());
//Return to adminAuthen.php
header( "Location: adminAuthen.php");
}
else{
//If on file, set the session variable, and enter site.
$_SESSION["name"] = $name;
$_SESSION["retry"] = "admit";
$_SESSION["time"] = time();
header( "Location: /ClassRegistration/Maintenance/systementry.php")
}
?>
Thank you :)