[請益]A網頁 寫入資料 到資料庫核對....
我再寫一個網頁,昨天都還好好的.....今天卻不行了,都不知道什麼原因
內容很簡單,請幫我看看,是哪個地方錯了...
<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: 211.74.103.38
推
05/03 23:40, , 1F
05/03 23:40, 1F
→
05/03 23:41, , 2F
05/03 23:41, 2F
→
05/04 09:09, , 3F
05/04 09:09, 3F
→
05/04 09:11, , 4F
05/04 09:11, 4F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):
PHP 近期熱門文章
PTT數位生活區 即時熱門文章