while ($row1=mysql_fetch_object($result1)){?><input type="text" name="id_<? echo $row1->id;>" value="<?=$row1->id?>" >
<input type="text" name="prg_file_<? echo $row1->id;>" value="<?=$row1->prg_file?>"
<input type="text" name="for_path_<? echo $row1->id;>" value="<?=$row1->for_path?>"
<input type="text" name="to_path_<? echo $row1->id;>" value="<?=$row1->to_path?>"
<?}?>处理的时候循环取得数据,进行插入。。
<input type="text" name="prg_file_<? echo $row1->id;>" value="<?=$row1->prg_file?>"
<input type="text" name="for_path_<? echo $row1->id;>" value="<?=$row1->for_path?>"
<input type="text" name="to_path_<? echo $row1->id;>" value="<?=$row1->to_path?>"
<?}?>处理的时候循环取得数据,进行插入。。
解决方案 »
- 一个批量修改。。请求指点
- 求用js写的列表滚动条(用键盘方向键控制光标上下移动)
- json 数据返回 ,json_decode 之后为空
- 搜索算法:我想做一个搜索程序,请大家帮帮我!
- 关于用php生成拓扑。。。行还是不行??
- 这是为什么????
- ORACLE在PHP中的使用?
- 如何用php读出swf文件的width和height?
- session问题??????
- 为什么有时输出图片时却显示个白框,即图片显示不出来?另gd库已打开。
- 今天第一次使用模板,看了2个例子,但觉得phplib的模板操作好象比smarty的模板操作麻烦得很,后是他们的代码,但是实现同一个简单的功能
- 请教如何对文件进行压缩备份?
$result1=mysql_query("select id,prg_file,for_path,to_path from mxp_prg where apply_id=$apply_id");
while ($row1=mysql_fetch_object($result1)){
$id=$row1->id; ?>
<input type="text" name="id" value="<?=$row1->id?>" >
<input type="text" name="prg_file_<?=$id?>" value="<?=$row1->prg_file?>"
<input type="text" name="for_path_<?=$id?>" value="<?=$row1->for_path?>"
<input type="text" name="to_path_<?=$id?>" value="<?=$row1->to_path?>"
<?}?>更新语句:
......
[这里循环怎么写????]
......
$result2=mysql_query("update mxp_prg set prg_file='$prg_file',for_path='$for_path',to_path='$to_path' where id='$id'");
<input type="text" name="prg_file[]" value="<?=$row1->prg_file?>"
<input type="text" name="for_path[]" value="<?=$row1->for_path?>"
<input type="text" name="to_path[]" value="<?=$row1->to_path?>"
<?}?>
foreach($_POST['id'] as $id){
$sql.="update ...... where id=$id;";
}