This is your code but simplified. Run, enter your email and password, click "login". Refresh the page a few times with F5
<?php
session_start();
var_dump($_SESSION);
$LoginSenderEMAIL = @filter_var($_POST['email'],FILTER_SANITIZE_EMAIL);
$LoginSenderPASS = @filter_var($_POST['password'],FILTER_SANITIZE_STRING);
if(isset($_SESSION['stest']) )
{
echo '<br/><b style="color:red;"> Session is OK.</b>';
}
else if(isset($LoginSenderEMAIL) && !empty($LoginSenderEMAIL) && isset($LoginSenderPASS) && !empty($LoginSenderPASS))
{
echo '<br/><b style="color:red;"> Form send. Session is OK</b>';
$_SESSION['stest'] = 'testsesion';
}
else{ ?>
<form method="post">
<table style="padding-left: 50px; padding-right: 50px;">
<tr>
<td class="rightAlign fontSize22">
<label for="email"> Email: </label>
</td>
<td>
<input type="email" name="email" id="email" class="fontSize22">
</td>
</tr>
<tr>
<td class="rightAlign fontSize22">
<label for="password">Password: </label>
</td>
<td>
<input type="password" name="password" id="password" class="fontSize22">
</td>
</tr>
<tr>
<td>
<a href="forgotPassword.php"><input type="button" value="Forgot Password?" class="fontSize22" style="background-color: #FF4F5A; border: none; color: white;"></a>
</td>
<td>
<input type="submit" value="Login" class="fontSize22" style="width:100%; background-color: #FF4F5A; border: none; color: white;">
</td>
</tr>
</table>
</form>
<?php } ?>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…