Created
January 31, 2015 14:21
-
-
Save bytefade/ab5952af40b387c40b8b to your computer and use it in GitHub Desktop.
Mensagem de sucesso com session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
//The second parameter on print_r returns the result to a variable rather than displaying it | |
$RequestSignature = md5($_SERVER['REQUEST_URI'].$_SERVER['QUERY_STRING'].print_r($_POST, true)); | |
if ($_SESSION['LastRequest'] == $RequestSignature) | |
{ | |
echo 'This is a refresh.'; | |
} | |
else | |
{ | |
echo 'This is a new request.'; | |
$_SESSION['LastRequest'] = $RequestSignature; | |
// echo '<div class="success">'.$_SESSION['msg_status'].'</div>'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment