idk where's the wrong part,but the update query didn't work.
this is the form
<form method="post"> <input type="checkbox" name="ceksetuju" id="cekbox" value="YA" required> <label for="cekbox">dengan ini saya setuju dengan syarat dan ketentuan yang berlaku</label><br> <input type="submit" name="agree" class="button special small" value="Next"> </form> and this is my php file
//CONNECT DATABASE $db = new mysqli('localhost', 'root', '130395', 'dbtest'); //UPDATE TABLE LIRIK if (isset($_POST['agree'])) { $id=mysqli_real_escape_string($db,$_GET['id_lirik']); $uname=$userRow['user_name']; $ceksetuju=$_POST['ceksetuju']; $sqlupdate ="UPDATE lirik set setuju_taken='$ceksetuju',taken_by ='$uname' FROM lirik where id_lirik='$id' "; $resultupdate = $db->query($sqlupdate); if ($resultupdate) { echo "success"; } else{ echo "failed"; } } and the result always 'failed'. so, Can somebody tell me what's wrong?