This is my table columns
admin_id username email password
admin_id is not null and increments when a new user is created.
The problem I am having is that its not saving the update to the database
Im not sure what im doing wrong but its likely the where clause.
<!DOCTYPE html>
<html>
<body>
<?php
// variables
$username = $_POST['username'];
$email = $_POST['email'];
$password = hash('sha512', $_POST['password']);
$admin_id = $_POST['admin_id'];
$page_title = null;
$page_title = 'Update admin';
require_once('header.php');
// connects
require_once('db.php');
$sql = "UPDATE Admin SET username = :username, email = :email, password = :password, admin_id = :admin_id";
$cmd = $conn->prepare($sql);
$cmd->bindParam(':admin_id', $admin_id, PDO::PARAM_INT);
$cmd->bindParam(':username', $username, PDO::PARAM_STR, 50);
$cmd->bindParam(':email', $email, PDO::PARAM_STR, 50);
$cmd->bindParam(':password', $password, PDO::PARAM_STR, 50);
$cmd->execute();
$Admin = $cmd->fetchAll();
$cmd->execute();
$conn = null;
require_once('footer.php');
?>
</body>
</html>