gpt4 book ai didi

php - 使用 php 中的复选框更新 mysql 数据库列中的值

转载 作者:可可西里 更新时间:2023-11-01 08:06:09 26 4
gpt4 key购买 nike

<分区>

我在 php 中有以下代码

$countryiso = mysql_query("SELECT distinct name as name FROM location_country where code NOT IN('A1','A2','AP','EU') order by name");
echo '<table>';
echo '<th>Country</th><th> Add/Remove </th>';
while ($row = mysql_fetch_assoc($countryiso)) {
echo '<tr>';
echo '<td>'. $row['name'] . '</td>';
echo '<td><form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"><input type="hidden" name="id" value="<?php echo $id; ?>" /><input type="checkbox" name="checkinsat" value="1"<?php if($data['checkinsat'] == '1') echo 'checked'; ?>/><input type="submit" ></form></td>';
echo '</tr>';
}
echo '</table>';

我得到了错误

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in don't know where i am mistaking.

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