看板 [ PHP ]
討論串[請益] 如何讓表單填入的數字是integer?
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者KC73 (肯先生)時間16年前 (2010/02/06 18:07), 編輯資訊
0
0
1
內容預覽:
http://tw.php.net/manual/en/function.is-int.php. 其實 document 有強調,中間 note 那一段:. Note: To test if a variable is a number or a numeric string (such as fo

推噓4(4推 0噓 2→)留言6則,0人參與, 最新作者ThiefFan (不務正業的賊)時間16年前 (2010/02/06 09:33), 編輯資訊
0
0
0
內容預覽:
有一表單可以輸入$linamount. <input type="text" name="linamount">. 想限制這個欄位只能輸入整數所以加了檢查函式. if(! is_int($linamount) ){. echo "linamount格式錯誤,請填入整數";. exit;. }. 但它
(還有218個字)
首頁
上一頁
1
下一頁
尾頁