这是我的代码。我无法通过 php 获取表单数据。即使我回应了表单数据,但它只显示没有重新加载登录页面登录表单
<form id="loginform" action="sql.php" method="post">
<label style="text-align:center" for="Email">Email :</label>
<input type="text" name="email" id="email" value="<?php echo $user_profile['email'];?>">
<label for="pass" style="text-align:center;">Password :</label>
<input type="password" name="password" id="password">
<div id="space" style="height:15px; width:500px; margin:auto;"></div>
<div id="button" style="height:30px; width:50px; margin:auto;">
<input type="submit"onclick="return verify(this);"name="submit" value="LoG In" style="border:outset; border-color:#000080; margin:auto;">
</div>
</form>
和 sql.php 文件
<?php
$a = $_POST['email'];
$b = $_POST['password'];
$c = mysql_real_escape_string($a);
$d = mysql_real_escape_string($b);
$e = htmlentities($c);
$f = htmlentities($d);
$user = strip_tags($e);
$pass = strip_tags($f);
session_start();
$dbhost = '';
$dbuser = '';
$dbpass = '';
$dbname = '';
$table = '';
$conn = mysql_connect($dbhost,$dbuser,$dbpass) or die ("I cannot connect to the database because: " . mysql_error());
mysql_select_db($dbname) or die ("I cannot select the database because: " .mysql_error());
$sql = "INSERT INTO data (email, password) VALUES('$user','$pass')";
$result = mysql_query($conn,$sql);
if($result){
echo $user;
echo "";
echo $pass;};
mysql_close($conn);?>