In addition to the other comments on here, what's this
$mobi
variable you're trying to assign to the session?
$_SESSION['mobi'] = $mobi;
$mobi=$_POST['mobi'];
The variable isn't actually set until later in the file, it seems to me like you're trying to do some sort of user login process and set the session variable once the login has been successful. If this is the case, you need to move that assignment down into the
if
block:
if($num > 0) {
$_SESSION['mobi'] = $mobi;
header("Location:https://brandstuckers.com/index.php");
exit();
}
Variables must be assigned values before you can reference them. In the change I've suggested the
$mobi
variable is updated with the value of
$_POST['mobi']
before we try and assign it to the session.