我想创建一个登录页面,但它不起作用。任何人都可以看到错误。谢谢你
我有一个数据库,其中有 3 行电子邮件-密码-客户 ID。
<?
$email = $_POST['email'];
$password= $_POST['password'];
$login = $_POST['login'];
$user_custermers_id = $_GET['id'];
if($login = 'yes')
{
global $wpdb;
$get = mysql_query("SELECT * FROM das_custermer_users WHERE email = '$email' AND password = '$password'") or die(mysql_error());
$result = mysql_result($get, 0);
if($result != 1)
{
$msg = "WRONG MESSEGE";
}
else
{
session_start();
$_SESSION['email'] = $email;
header("location: http://tgdashboard.com");
}
}
?>
我的 HTML
<form action="<? echo $_SERVER['PHP_SELF']; ?>" method="post">
<div class="header">
Loginoplysninger
</div>
<div class="row">
<label for="user">E-mail:</label>
<input type="text" name="user" id="user" value="">
</div>
<div class="row">
<label for="pass">Password:</label>
<input type="password" name="pass" id="pass" value="">
</div>
<div class="row">
<input type="submit" name="login" value="Login">