Re: [請益]A網頁 寫入資料 到資料庫核對....
※ 引述《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
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):
PHP 近期熱門文章
PTT數位生活區 即時熱門文章