我正在寻找如何保存对我的sql DB的满意度。
我有这样的事情:
echo '<td contenteditable="true" onblur="saveToDatabase" id="regist" style="background-color:'.$row['regist_color'].'" >'.$row['regist'].'</td>'
我不知道如何通过onblur="function"
将此信息发送到此网址:
<?php
include 'db.php';
$id=$_POST['id'];
$sql = "UPDATE minichat SET
regist='".$_POST['regist']."' WHERE id=".$_POST['id'];
if (mysqli_query($conn, $sql)) {
echo "Record deleted successfully";
} else {
echo "Error deleting record: " . mysqli_error($conn);
}
('location:index.php');
mysqli_close($conn);
?>