Php 隐藏ID列和其他显示数据的列
我在这一段代码上遇到了问题,似乎无法解决问题 我在网上查看了一下,我当前遇到的错误与一个失败的查询有关,但当我按照步骤解决这个问题时,它似乎不起作用 我需要做的是有两个独立的列,一个用于id,另一个用于Php 隐藏ID列和其他显示数据的列,php,html,mysql,hidden,Php,Html,Mysql,Hidden,我在这一段代码上遇到了问题,似乎无法解决问题 我在网上查看了一下,我当前遇到的错误与一个失败的查询有关,但当我按照步骤解决这个问题时,它似乎不起作用 我需要做的是有两个独立的列,一个用于id,另一个用于ids保存的数据,我需要它从名为tbl typeofbusiness 这是我的代码: <tr> <td>Type of Business:</td> <td> <select name="typeofbusine
id
s保存的数据,我需要它从名为tbl typeofbusiness
这是我的代码:
<tr>
<td>Type of Business:</td>
<td>
<select name="typeofbusiness">
<option value=''> - select type of business -</option>
<?php
$sql = "SELECT tbl_typesofbusiness.ID, tbl_typesofbusiness.Agent
FROM tbl_typesofbusiness";
$res = mysqli_query($con,$sql)or ("Error: ".mysqli_error($con));
while (list($id, $tob) = mysqli_fetch_row($res)); {
echo "<option value='$id'>$tob</option>\n";
}
?>
</select>
</td>
<td>
<span class="error">*
<?php if (isset($errors['typeofbusiness']))
echo $errors['typeofbusiness']; ?>
</span>
</td>
</tr>
业务类型:
-选择业务类型-
While循环在$error变量之前关闭
$error未使用And Fetch数组函数
<?php
$errors= mysql_fetch_array($res);
?>
<td><span class="error">* <?php if (isset($errors['typeofbusiness'])) { echo$errors['typeofbusiness']; }?></span></td>
</tr>
*
试试这个。可能是重复的,因为你喜欢评论,我会添加所以为你提供拼写更正,那么collumn
是如何通过三次的呢?我想我还是遇到了同样的错误,但现在我又得到了3个(!)警告:mysql_fetch_array()希望参数1是资源,在第263行调用堆栈#时间记忆函数位置1 0.0000 193368{main}()..\addeadstemplate.php:0 2 0.0625 205832 mysql_fetch_array()..\addeadstemplate.php:263(!)上的C:\wamp\www\AddLeads\addeadstemplate.php中给出的布尔值注意:未定义的索引:402行调用堆栈#时间内存函数位置1 0.0000 193368{main}()..\addeadstemplate.php中的代理C:\wamp\www\AddLeads\addeadstemplate.php中的未定义索引:402行调用堆栈#时间内存函数位置1 0.0000 193368{main}()..\addeadstemplate.php:0