Howdy!
I'm having a bit of problem here.
THE GIST
I'm currenting doing a rating program. Anyone can access the profile of any member, but if you want to rate someone, you must login.
Say you are at the member page, you want to rate the person. You select the rating from a drop down menu and hit submit.
The next page first checks to see if you are a member, if you are not, it forces you to login.
<?php
if (!isset($SESSION['logged_in'])) {
$SESSION["prevpage"] = $_SERVER['PHP_SELF'];
$loginpage = "http://website.com/login.php";
header("Location: $loginpage");
exit;
?>
Then on the login process page if the person successfully logs in:
<?php
if (isset($SESSION['prevpage'])) {
$prevpage = $SESSION['prevpage'];
header("Location: $prevpage");
exit;
}
?>
This works wonderful, but the rating information which is sent via a $_POST gets lost in the shuffle -- meaning, the rating is lost.
What do you guys suggest I do? I'm a bit confused. Do I need to also add the rating information to the login_check in the form of SESSIONS? Is there a better way to do this?
Thanks