PHP问题文本域问题 20
$can=mysql_connect("localhost","root","");$db_selected=mysql_select_db("my",$can);mys...
$can = mysql_connect("localhost","root","");
$db_selected = mysql_select_db("my", $can);
mysql_query("set names utf8");
$sqlll=mysql_query("SELECT zhonglei,danjia,shuliang,shouyi,id FROM shuiguo ");
echo "<tr>";
while($rows = mysql_fetch_row($sqlll)){
echo "<tr>";
echo "<td align=center > ".$rows[0]."</td>";
echo "<td align=center > ".$rows[1]."</td>";
echo "<td align=center > ".$rows[2]."</td>";
echo "<td align=center > ".'<input name="
$rows[5]" type="text" size="6"/>'."</td>";
}
echo "</tr></table>";
mysql_close($can);
链接数据库。让 表 shuiguo里面的内容统统显示出来。
但
echo "<td align=center > ".'<input name="
$rows[5]" type="text" size="6"/>'."</td>";
这个地方想要用文本域显示。如何让它的name为表里面的id? 展开
$db_selected = mysql_select_db("my", $can);
mysql_query("set names utf8");
$sqlll=mysql_query("SELECT zhonglei,danjia,shuliang,shouyi,id FROM shuiguo ");
echo "<tr>";
while($rows = mysql_fetch_row($sqlll)){
echo "<tr>";
echo "<td align=center > ".$rows[0]."</td>";
echo "<td align=center > ".$rows[1]."</td>";
echo "<td align=center > ".$rows[2]."</td>";
echo "<td align=center > ".'<input name="
$rows[5]" type="text" size="6"/>'."</td>";
}
echo "</tr></table>";
mysql_close($can);
链接数据库。让 表 shuiguo里面的内容统统显示出来。
但
echo "<td align=center > ".'<input name="
$rows[5]" type="text" size="6"/>'."</td>";
这个地方想要用文本域显示。如何让它的name为表里面的id? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询