I can't update my table on the database, my code seems to look fine. I see no errors in it and yet it's not working.
$userType = mysqli_real_escape_string($conn, trim($_POST['type']));
$password = md5($password_1); //encrypt the password before saving in the database
$codeInput = mysqli_real_escape_string($conn, trim($_POST['code']));
$clientInfo = "UPDATE client SET
client_username='$username',
email_add='$email'
WHERE code = '$codeInput')";
$query = "INSERT INTO account (username, email, password, type)
VALUES ('$username', '$email', '$password', '$userType')";
mysqli_query($conn, $clientInfo);
mysqli_query($conn, $query);
$_SESSION['username'] = $username;
$_SESSION['success'] = "You are now logged in";
header('location: ../public/pgClient/index.php');
UPDATE:
After showing error here is what it says now.
Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1 in C:\xampp\htdocs\FAME\private\includes\server.php:72 Stack trace: #0 C:\xampp\htdocs\FAME\private\includes\server.php(72): mysqli_query(Object(mysqli), 'UPDATE client S...') #1 C:\xampp\htdocs\FAME\public\sgnUp.php(1): include('C:\\xampp\\htdocs...') #2 {main} thrown in C:\xampp\htdocs\FAME\private\includes\server.php on line 72