這裏是我的登記表:報名表 - 注意:未定義指數
<p>Please fill out all fields</p><br>
<form method="POST" action="login/login.php">
<!-- name is the VARIABLE -->
Username: <input type="text" name="username"></br>
Password: <input type="password" name="password"></br>
Email: <input type="text" name="email"></br>
</form>
</br>
</br>
<form method="POST" action="login/process.php" "> </br>
<input type='submit' value='submit registration'/>
</form>
這裏是我的process.php文件:
<?php
print "<center>";
$Username = $_POST["username"];
$Password = $_POST["password"];
$Email = $_POST["email"];
?>
<?php
include "../shopdb/connection.php";
$query="INSERT INTO USERS (ID, Username, Password, Email) VALUES ('','$Username','$Password','$Email')";
mysql_query($query,$connect);
?>
我不斷收到此錯誤:
Notice: Undefined index: username in C:\xampp\htdocs\IIS\login\process.php on line 3
Notice: Undefined index: password in C:\xampp\htdocs\IIS\login\process.php on line 4
Notice: Undefined index: email in C:\xampp\htdocs\IIS\login\process.php on line 5
You are successfully connected to the database.
(底部的消息是我添加的連接腳本的一部分,用於顯示我已連接到DB)。
任何幫助將是偉大的。
你的問題是什麼?錯誤信息有點不清楚嗎? – hakre
或者,這僅僅是一個問題,如何在HTML中工作? – hakre
或者你想知道兩種表格可以有相同的字段嗎? – hakre