<?php
if($_SERVER['REQUEST_METHOD']=='POST'){
$username = $_POST['username'];
$password = $_POST['password'];
$sql = "SELECT * FROM main_member WHERE username='$username' AND password='$password'";
require_once('connect.php');
sql $result = mysqli_query($con,$sql);
$check = mysqli_fetch_array($result);
if(isset($check));
{
echo "success";
}else{
echo "Gagal";
}
mysqli_close($con);
}
?>
它说解析错误语法错误,在第7行的C:\ xampp \ htdocs \ php \ login.php中意外的$ result T_VARIABLE,请帮助我们,我真的很感激
答案 0 :(得分:0)
此行中有错误
sql $result = mysqli_query($con,$sql);
将此更改为
$result = mysqli_query($con,$sql);
更改此行
if(isset($check));
到
if(isset($check))