[請益] 無法寫進資料庫

看板PHP作者 (.)時間15年前 (2009/03/03 19:18), 編輯推噓5(501)
留言6則, 5人參與, 最新討論串1/1
以下是我的程式碼 首頁(index.php)的部份 <html> <form method = 'post' action='m1.php'> 帳號: <input type='text' name='id' size='12' maxlength='12'><br> 密碼: <input type='password name='pwd' size='14' maxlength='8'> <input type = submit value = '確認送出'> </html> m1.php的部份 <? $id = $_post["id"]; $pwd = $_post["pwd"]; $sql = "insert into `member`(`serial`,`id`,`pwd`,`datex`) values ('','$id','$pwd',now())"; $result = mysql_query($sql,$link); if($result) {echo "建立成功";} else {echo "建立失敗";} mysql_close($link); ?> 資料庫 資料表 還有欄位部分都建好了 在首頁輸入帳號密碼 送出後有顯示 "建立成功" 資料表裡有出現我設定的4個欄位 但是資料表裡的 欄位 沒有東西 沒有顯示我輸入的值 拜託各位幫我檢查程式哪裡有錯 感激不盡! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.170.1.33 ※ 編輯: wheree 來自: 118.170.1.33 (03/03 19:24) ※ 編輯: wheree 來自: 118.170.1.33 (03/03 19:33)

03/03 19:39, , 1F
$_post["id"] -> $_POST["id"]
03/03 19:39, 1F

03/03 19:48, , 2F
成功了 感謝您!
03/03 19:48, 2F

03/03 23:46, , 3F
洞很大 洞不用錢...
03/03 23:46, 3F

03/04 05:05, , 4F
關鍵字:SQL injection
03/04 05:05, 4F

03/04 08:09, , 5F
推樓上-.-
03/04 08:09, 5F

03/04 10:20, , 6F
mysql_real_escape
03/04 10:20, 6F
文章代碼(AID): #19hH8Nm4 (PHP)