gpt4 book ai didi

Php MySql 未知错误

转载 作者:太空宇宙 更新时间:2023-11-03 10:59:35 24 4
gpt4 key购买 nike

<分区>

你好,我上面的这个脚本有问题......它做了事情但返回错误......它正确地更改了数据库但返回错误......我有什么地方出错了吗?

$result = mysql_query(
"INSERT INTO student (fullname, username, password, group_id)
VALUES ('$fullname', '$username', '$password', '$group_id')"
);

if ($result == 'true'){

$caturi = $group_id;
if (isset($_POST['subject'])) {

foreach ($_POST['subject'] as $cat) {
$values[] = sprintf (
"(%d, '%s')",
intval($cat),
mysql_real_escape_string($caturi)
);
}
$result2 = "INSERT INTO list (subject_a, group_a)
VALUES " . join(',', $values);
mysql_query($result2);

}

echo '<p align="center" style="color:#ccc;">Success...</p>';
}
else{
echo "Error...";
}

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com