hallo
ik krijg een error in deze code:
<?php
if (isset($_POST['submit'])){
$email = mysqli_real_escape_string($conn, $_POST['Email']);
$vote1 = mysqli_real_escape_string($conn, $_POST['vote1']);
$vote2 = mysqli_real_escape_string($conn, $_POST['vote2']);
$vote3 = mysqli_real_escape_string($conn, $_POST['vote3']);
$stmt = mysqli_prepare($db_link, "
UPDATE poll
SET band_regel =
CASE stemmen
WHEN ? THEN punten + 10
WHEN ? THEN punten + 6
WHEN ? THEN punten + 3
END
WHERE stemmen IN (?, ?, ?)");
mysqli_stmt_bind_param($stmt, "iiiiii", $vote1, $vote2, $vote3, $vote1, $vote2, $vote3);
mysqli_stmt_execute($stmt);
?>
in this code is the error it says :
<?php
mysqli_stmt_bind_param($stmt, "iiiiii", $vote1, $vote2, $vote3, $vote1,$vote2, $vote3);
mysqli_stmt_execute($stmt);?
?>
and this is the error that is showing up in the website :
Warning: mysqli_stmt_bind_param() expects parameter 1 to be mysqli_stmt, boolean given in C:\wamp64\www\poll2.php on line 129
and:
Warning: mysqli_stmt_execute() expects parameter 1 to be mysqli_stmt, boolean given in C:\wamp64\www\poll2.php on line 130
i hope somebody can help me with this :)
594 views