I'm facing this problem and I've searching for hours now..
I can't see any problem in this piece of code... What's wrong here?
db.php:
$mysqli = mysqli_connect('localhost', 'root', '', 'site');
if(mysqli_connect_errno())
{
echo "Erro BD";
exit();
}
?>
update.php:
include 'db.php';
$zzz = '';
$email = 'asdsaf@gmail.com';
$ins = $mysqli->prepare("update USER set cod_valida =? where email =?");
$ins->bind_param('ss', $zzz, $email);
if ($result = $ins->execute()){
$ins->free_result();
echo "It works";
}
else
{
echo "Error";
}
$ins->close();
$mysqli->close();
Is there anyway to echo the query I'm trying to send or the mysql error?
Thank you for your help instead of downvote my thread since I already checked everything and found no answer.
No comments:
Post a Comment