Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(mysql_num_rows($result) == 0){
- echo 'You have supplied a wrong user/password combination. Please try again.';
- }
- else{
- //set the $_SESSION['signed_in'] variable to TRUE
- $_SESSION['signed_in'] = true;
- //we also put the user_id and user_name values in the $_SESSION, so we can use it at various pages
- while($row = mysql_fetch_assoc($result)){
- $_SESSION['user_id'] = $row['user_id'];
- $_SESSION['user_name'] = $row['user_name'];
- $_SESSION['user_level'] = $row['user_level'];
- }
- echo 'Welcome, '. $_SESSION['user_name'].'. <br /><a href="index.php">Proceed to the forum overview</a>.';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement