我有一个项目,我为学生创建了一个积分系统。学生可能会查看问题的解决方案,但如果这样做,他们应该会失去 2 分,并且他们的个人资料也应该更新为新的分数。是否可以通过单击链接来更新表格?我试图做以下事情:
if($points >0)
{
if(($status== '') || ($newuniq_id!= $uniq_id) || ($newquestion_id!= $quid))
{
$query = "insert into status(uniq_id, user_id, user_name, question_id, status) values('$uniq_id', '$id','$name','$quid','read')";
mysql_query($query);
$newpoints = $points - $cut_points;
$newquery1 = "update $tabl_u set points = '$newpoints' where uniq = '$uniq1'";
$newquer2 = mysql_query($newquery1);
}
}