PHP modifies a single piece of data, and all the data has been modified.
if ($_get["type"]== "modify") {
$id =$_get[' id '];
if ($_post["SUBMIT3"])
{
$result = $connection->query ("Update t_user set f_username= ' $a ', f_sex= ' $b ', f_age= ' $c ', f_ct= ' $d ', f_zaoyingji= ' $f ' , f_buwei= ' $g ', f_hu= ' $h ', f_jishu= ' $i ', f_xiaoaguo= ' $j ', f_qianming= ' $k ', f_yanchi_time= ' $l ', f_chufa_time= ' $m ');
if ($result) {
echo "";
}
else {
echo "Data modification failed";
}
}
$result = $connection->query ("select * from T_user where id= $id");
while ($rws = $result->fetch_row ()) {
?>
}
?>
if ($_get["type"]== "Del") {
$id =$_get["id"];
$result = $connection->query ("Delete from T_user where ID in ($id)");
echo "";
}
?>
------Solution--------------------
Update requires an add-on where id= ' $id '
$result = $connection->query ("Update t_user set f_username= ' $a ', f_sex= ' $b ', f_age= ' $c ', f_ct= ' $d ', f_zaoyingji= ' $f ' , f_buwei= ' $g ', f_hu= ' $h ', f_jishu= ' $i ', f_xiaoaguo= ' $j ', f_qianming= ' $k ', f_yanchi_time= ' $l ', f_chufa_time= ' $m ' where Id= ' $id ');