Re: [請益] radio box如何寫入資料庫?

看板PHP作者 (貢貢老盃)時間14年前 (2011/07/27 09:52), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
※ 引述《stony1990 (很愛打網球)》之銘言: : 我的rodio button如下 : <td height="30px" colspan="2"><img src="test.gif" width="5" height="8" : style="padding-right:10px" />哪種方式?</td> : </tr> : <tr> : <td height="30px"></td> : <td><input name="button" type="radio" value="" /> : 是的。</td> : </tr> : <tr> : <td height="30px"></td> : <td height="30px"><label> : <input type="radio" name="button" id="radio" value="radio" /> : </label> : 不要。</td> : </tr> : 要如何用post寫入資料庫? : 還是說在radio button的每個選項都給不同的name 判斷是否為true 是的話才寫進資料庫 : ? : 請前輩們幫忙一下吧! <input type="radio" name="button" value="0" /> <input type="radio" name="button" value="1" /> <input type="radio" name="button" value="2" /> <input type="radio" name="button" value="3" /> 選了這四個其中一個,$_POST['button'] 會等於0,1,2,3其中一個 -- ˋ ˋ φhacoolman 養一隻邊境牧羊犬, / \ 養嘛養嘛養嘛 就能常常換新手機喔! / \ 嘛養嘛養嘛 │ │ 嘛養嘛養嘛 好邊境不養嗎好邊境不\ │ (●ω●) 好邊境不養嗎好邊境不養嗎 \ ︶︶ / 嘿~嘿~嘿~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.117.42.243
文章代碼(AID): #1EBszmzd (PHP)
文章代碼(AID): #1EBszmzd (PHP)