I've looked through a lot of searches for this topic, but I couldn't find any sites that could help me. What I want to do is to be able to allow members to go into member pages and non members from going to them. I've studied sessions and that help to better understand sessions....so far, my session from login.php
loging.php
<?php
session_start();
// When you go back, the information is still there...IE 6 Fix.
header("Cache-control: private"); // IE 6 Fix.
// Register the input with the value
$_SESSION['user_name'] = $_POST['user_name'];
?>
<P CLASS="bold">LOGIN</P>
<FORM ACTION="$php_self" METHOD="POST">
<P CLASS="bold">Username<BR>
<INPUT TYPE="TEXT" NAME="user_name" VALUE="" SIZE="10" MAXLENGTH="15"></P>
<P CLASS="bold">Password<BR>
<INPUT TYPE="password" NAME="password" VALUE="" SIZE="10" MAXLENGTH="15"></P>
<P><INPUT TYPE="SUBMIT" NAME="submit" VALUE="Login"></P>
</FORM>
//**********************************************
and my code for the site where people go after they logged in.
index.php
<?php
// start the session
session_start();
header("Cache-control: private"); //IE 6 Fix
?>
//***********************************************
can anyone suggest some sources that I can use to keep nonmembers from member page(s)? or help me with my code to make it work? Right now, anyone can get to my member url to go to my memberpage(s) without logging in.