بروز خطا
[message]
اشتراک در سوال
رای ها
[dataList]
خطای یا پیغام زیر پس از زدن روی دکمه login چیست
پس از زدن روی دکمه لاگین پیغام زیر می اید
طبق پروژه نوت پیش رفتم موقع لاگین شدن این پیغام می اید
Array ( [email] => tgtg [password] => cdwcef )
( ! ) Fatal error: Uncaught Error: Call to a member function first() on null in C:\dev\workspace\web\proje 8\login-check.php on line 9( ! ) Error: Call to a member function first() on null in C:\dev\workspace\web\proje 8\login-check.php on line 9Call Stack#TimeMemoryFunctionLocation10.0011406104{main}( )...\login-check.php:0
کد من بصورت زیر است :
<html>
<head>
<meta charset="UTF_8">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="base.css">
</head>
<body>
<div>
<div class="tac">
<img src="aks.png"><br><br>
<form action="login-check.php" method="post">
<input type="text" placeholder="eamil" name="email"><br>
<br>
<input type="password" placeholder="password" name="password"><br><br>
<button type="submit" class="btn-blue">Login</button><br>
<br>
</form>
<br>
<br>
<span class="link-gray">creat new account</span>
</div>
</div>
</body>
</html>
</html>
کد login check من :
<?
require_once('main.php');
dump($_POST);
$email = $_POST['email'];
$pass = $_POST['password'];
$db = Db::getInstance();
$record = $db->first("SELECT * FROM x_user WHERE email='$email'");
if ($record == null){
$message = "Login Failed, Check your Email and Password.";
require_once("login-fail.php");
exit;
} else {
if ($password == $record['password']){
$message = "Congratulation. You are welcome";
require_once("login-success.php");
exit;
} else {
$message = "Password is incorrect";
require_once("login-fail.php");
exit;
}
}
?>
مشکل ارور رو ممنون میشم بگین از کجاست
برای این سوال پاسخی وجود ندارد.
پاسخگویی و مشاهده پاسخ های این سوال تنها برای اعضای ویژه سایت امکان پذیر است .
چنانچه تمایل دارید به همه بخش ها دسترسی داشته باشید میتوانید از این بخش لایسنس این آموزش را خریداری نمایید .