Hi there :) I use session variables to do this, once the user has logged in
and you know they are who they say they are, set a session variable using

$isloggedin = "yes";

And at the top of every page you want protected simply do a check to see if
it is set or not. Below code checks to see if that var is set and if not it
redirects them to another page.

<?php session_start(); ?>

if (!isset($HTTP_SESSION_VARS["islogged"])){



Hope this helps, Joe :)

"Jas" <[EMAIL PROTECTED]> wrote in message
> I am wondering if there is a good tutorial on how to use php to make users
> come from a page before they can access another.  For instance, say you
> one page called index.php which contains a form that once filled in links
> a confirmation page to verify the users data was entered correctly then
> there links to a page that stores the users data into a database table.
> problem I would like to alleviate is to make sure the users cannot just
> in the name of the last page in the url and put a blank entry into the
> database.  I have read a few tutorials on using sessions but I am unclear
> how the use of sessions would require the user to visit each page in
> succession.  Thanks in advance,
> Jas

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to