Re: Re: forced page links...
| From: | Dan Brunner | Date: | Wed, 27 Feb 2002 20:08:23 +0000 |
| Subject: | Re: Re: forced page links... | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-17331@lists.php.net to get a copy of this message | ||
Hello!!
What I would do is have both the 2 page and the last page on the the same page!!
All my pages are only two...a form page and a processing page...that's it....
However....
You could also have a variable pass from page to page, like a hidden variable, either in a form, or with cookies.
And check for that variable every page with an If...else..statement.....
like
If (empty($CheckPLEASE){
echo "Sorry You are out of order";
exit();
}else{
echo "hey your good to go!!";
}
And so on and so on.......
Dan
On Wednesday, February 27, 2002, at 02:03 AM, jlgerfen@hotmail.com wrote:
Can you accomplish this without having the user logged in? I am unconcerned with whether or not the user has logged in, I simply need the user to not be able to bypass a page with a form to go directly to the end page which will connect and store the form contents into a db. Thanks in advance, Jas "Lerp" <joe@coastaldestination.com> wrote in message news:20020227185828.45920.qmail@pb1.pair.com...Hi there :) I use session variables to do this, once the user has loggedinand you know they are who they say they are, set a session variable using session_register("isloggedin"); $isloggedin = "yes"; And at the top of every page you want protected simply do a check to seeifit is set or not. Below code checks to see if that var is set and if notitredirects them to another page. <?php session_start(); ?> <?php if (!isset($HTTP_SESSION_VARS["islogged"])){ header("Location:index.php"); } ?> Hope this helps, Joe :) "Jas" <jlgerfen@hotmail.com> wrote in message news:20020227171009.50616.qmail@pb1.pair.com...usersI am wondering if there is a good tutorial on how to use php to makelinkscome from a page before they can access another. For instance, say youhaveone page called index.php which contains a form that once filled intouncleara confirmation page to verify the users data was entered correctly thenfromthere links to a page that stores the users data into a database table.Theproblem I would like to alleviate is to make sure the users cannot justtypein 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 amon-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phphow the use of sessions would require the user to visit each page in succession. Thanks in advance, Jas