I'm new to PHP and I need to fix the php files hat were given to me,I keep getting errors on this one saying line 12 has an error.Hope you can teach me guys
For example:
<?php
if($_SERVER['REQUEST_METHOD'] == 'GET')
{
if(isset($_GET['email']) && isset($_GET['password']) && ($_GET['password'])!='' && $_GET['email']!='')
{
require_once 'connect.php';
$em = $_GET['email'];
$pw = $_GET['password'];
$sql = "SELECT * FROM user_accounts a, user_info ui WHERE email='$em' and password='$pw' and a.userid=ui.userid";
$result = mysqli_query($conn, $sql);
if(mysqli_num_rows($result) != 0){
$row = mysqli_fetch_row($result);
session_start();
echo 'Authorized';
$_SESSION['Authorized'] = 'Granted';
$_SESSION['fullname'] = $row[7]. " " . $row[6];
} else{
echo "Invalid email or password.";
}
mysqli_close ($conn);
}else{
echo "Please fill all fields.";
}
} else{
echo "Access not authorized, access denied.";
}
?>
/PS im also new in posting threads sry