Jump to content


Photo

Sessions problem....


  • Please log in to reply
1 reply to this topic

#1 locutus84

locutus84
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 20 May 2003 - 05:20 PM

I\'ve started to build my own forum with some help of the membership system that phpfreaks have....however I have a problem with making a user level session to work. How should I do to make it work?
Could somone please help me, I need it to work before friday because then I need to handover my forum to my theacher....

<?php

session_start();

//check to make sure the session variable is registered
if(session_is_registered(\'first_name\')){

//the session variable is registered, the user is allowed to see anything that follows


}
else{

//the session variable isn\'t registered, send them back to the login page
header(\"Location: login_form.html\");
}



if ($user_level= \"2\") {
header(\"Location: forum.php\");}


//the session variable is registered, the user is allowed to see anything that follows



?>

#2 shivabharat

shivabharat
  • Members
  • PipPipPip
  • Advanced Member
  • 371 posts
  • LocationChennai, India

Posted 21 May 2003 - 07:31 AM

Try this

http://www.phpfreaks...ghlight=session


More doubts post it here
Knowledge --- Reading Enriches Mind But Sharing Enhances It.[br][br]Note: Before you request help enusre that you have had a look at the tutorials @phpfreaks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users