i got “else” error`s an no i haf trying to fix it the last 3 dayes at i can figur out the error, need help
// Initialize the session
session_start();
// Check if the user is logged in, if not then redirect him to login page
if(!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true){
header("location: login.php");
exit;
}
$con = mysqli_connect("localhost", "root", ""); // Establishing Connection with Server
if(!con)
{
echo 'not connecte';
}
if(mysqli_select_db($con,'dhl'))
{
echo 'databace not selected';
}
$Chipnummer = $_POST['Chipnummer'];
$DHLnummer = $_POST['DHLnummer'];
$navn = $_POST['navn'];
$Race = $_POST['Race'];
$sql = "insert into users(email, Chipnummer, DHLnummer, navn, Race) values ('$email', '$Chipnummer', '$DHLnummer', '$navn', '$Race')";
if(!mysqli_query ($con, $sql));
{
echo 'not incerted';
}else{
echo 'inserted';
}
header("refresh:2 url=index.html");