update query not working in pdo no errors code example
Example: update number in sql pdo php not working
<?php
include("php-includes/check-login1.php");
echo $username;
$profile = "0";
require_once("config/pdo.php");
$data = [
'profile' => $profile,
'username' => $username,
];
$sql = "UPDATE customer SET photoup=:profile WHERE mmob=:username";
$stmt= $conn->prepare($sql);
$stmt->execute($data);
if($stmt){
echo "success";
//echo '<script>window.location.assign("memhome.php");</script>';
}
else
{
echo "error";
}
?>