Re: [請益]A網頁 寫入資料 到資料庫核對....

看板PHP作者 (ILikeWater)時間16年前 (2009/05/06 11:50), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
※ 引述《olivet (smallred)》之銘言: : 我再寫一個網頁,昨天都還好好的.....今天卻不行了,都不知道什麼原因 : 內容很簡單,請幫我看看,是哪個地方錯了... : <html> : <head> : <title>userform</title> : </head> : <body> : <form action="userform.php" method="post"> : 帳號:<input type="text" name="id" size="12"><br> : 密碼:<input type="password" name="password" size="12"><p> : EMAIL:<input type="text" name="email" size="48"><p> : 手機:<input type="password" name="sellphone" size="12"><p> : <input type="submit" name="submit" value="傳送"> : <input type="reset" name="reset" value="重填"> : </form> : </body> : </html> : 這是第二支程式 : <html> : <body> : <form> : frtre //這是看有沒有進入,會顯示在螢幕,但都沒有 : <?php : include_once("link.php"); : echo "dewrwerwr"; //這也是測試有沒有進這畫面,但都沒有.... : $id=$_POST['id']; : $password=$_POST['password']; : $email=$_POST['email']; : $sellphone=$_POST['sellphone']; : if($id != ""&& $email != "" ) { : $query="SELECT*FROM usertable WHERE id= '$id';"; : $result=mysql_query($query,$link); : if(mysql_num_fields($result)==-1){ : $query="INSERT INTO usertable (id,password,lot,lat,friend,line,status,address,email,sellphone)VALUES ('$id','$password','','','','','','','$email','$sellphone');"; : $result=mysql_query($query,$link); : echo "新增成功";} : }else : echo "sorry you input user "; : <a href="userform.html"> input </a> <br> : ?> : </form> : </body> : </html>put </a> <br> ^^^^^^^^^^^^^^^^^ 這是多餘的 : ?> ^^^^^ 這也是多餘的 其他的沒瞧見異樣。 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.190.231
文章代碼(AID): #1A0Ga8x3 (PHP)
文章代碼(AID): #1A0Ga8x3 (PHP)