I'm using this script for login on a site in development: http://www.php-login.net/
I'm using the simple login, like so:
require_once("config/db.php");
// load the login class
require_once("classes/Login.php");
// create a login object.
$login = new Login();
// ... ask if we are logged in here:
if ($login->isUserLoggedIn() == true) {
$userid = $_SESSION['user_id'];
$time = Users::getData($userid);
include("views/logged_in.php");
} else {
// the user is not logged in...
include("views/not_logged_in.php");
}
The script saves the login id in a session which I then use as a parameter in my function getData. This works fine, the problem is when I a) refressh the page b) navigate with whe forward/backward buttons in the browser.
I keep getting the "confirm resending form..." message pop up, which of course is not very user friendly.
How can I avoid this?