-2
<?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); 
}
?>


it says parse error syntax error, unexpected $result T_VARIABLE in C:\xampp\htdocs\php\login.php on line 7, please help me guys i really appreciate it

Adam Bayu
  • 23
  • 4

1 Answers1

0

you have error in this line

sql $result = mysqli_query($con,$sql); 

change this to

$result = mysqli_query($con,$sql); 

change this line

if(isset($check));

to

if(isset($check))
Shibon
  • 1,552
  • 2
  • 9
  • 20