As the title said, login page should be in flash(login.swf), and the redirect to a php page (account.php). In account.php, I will need to check session, for example:
isset($_SESSION['loggedin']){
echo "Welcome back, $user";
} else {
echo "You need to login and main site";
}
Where do I generate the sessions, and where do I store it, and how do I do the session check??
EDIT: About my current problems
- Login in swf page
- user type username and password and send to authenticate.php
- if its valid user, i send variables back to flash: echo "login=true" and then start and create session e.g $_SESSION['username']
- Back to flash, after some animation going, I click a button that link to profile.php page
- In profile.php, i do a check if(isset($_SESSION['username']){ echo "welcome back user";
- But the problem is, after i login in flash/swf page, i click the button to the profile.php page, I still need to login again, means, there is no $_SESSION['username'].
So, my questions: Where do I generate the sessions, and where do I store it, and how do I do the session check??