[請益] 表單送出後新增資料問題

看板PHP作者 (順)時間17年前 (2009/02/18 10:38), 編輯推噓2(200)
留言2則, 2人參與, 最新討論串1/6 (看更多)
<?php do { ?> <tr> <td><?php echo $row['name'] ; ?></td> <td colspan="3"> <input name="<?php echo $row['content'] ; ?>" type="radio" value="1"> <input name="<?php echo $row['content'] ; ?>" type="radio" value="0"> </td> </tr> <?php } while ($row = mysql_fetch_assoc($res)); ?> 如果表單如上,是利用迴圈跑出來的表單 想請問在送出的時候 有辦法寫出語法儲存進去嗎?! INSERT INTO table (欄位1,欄位2,content1,content2,...... ) VALUES ('$欄位1','$欄位2','$content1','$content2',......) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.136.168.61

02/18 11:38, , 1F
可以 程式都是人寫的
02/18 11:38, 1F

02/18 11:48, , 2F
設個字串變數 把欄位跟資料給丟進再 query
02/18 11:48, 2F
文章代碼(AID): #19ctIs5M (PHP)
文章代碼(AID): #19ctIs5M (PHP)