have been trying to get rid of the errors after someone on here showed me the
error_reporting(E_ALL);
For some reason it just doesnt like line 17, what is wrong have tried everything?
this is the error message
Parse error: syntax error, unexpected ';' in /home/global/public_html/admin/index.php on line 17
<?php session_start();
error_reporting(E_ALL);
require_once("nav.php");
if(!isset($_SESSION['user']))
{
$_SESSION['user'] = $_POST['username'];
$pass = $_POST['password'];
require_once("dbconnect.inc.php");
if($_POST['submit']
{
// line 17 what is wrong?
$sql = "SELECT * FROM login WHERE username = '".$_SESSION['user']."' AND Password = '".$pass."'";
$result = mysql_query($sql,$conn);
header("location: index.php");
if (!$result)
{
echo "<p class='text'>Could not log you in - please try again.</p>";
}
session_write_close();
}
else {
include("pages/adminLogin.html");
}
}