Anikin you recent post to my other thread seems to make a bit more sense, thanks!
is the problem here becuase i do not have the file you mentioned session_restricted.php?
i think i have a better idea. i somehow have two threads with the same topic, oops! sorry. this last example you gave me makes sense.
anyway, when you say include this file session_restricted.php in all secured files do you mean reference them?
i'm not sure how you include the...
thanks. i can still access the restricted pages with no redirect. very odd.
if i place the code->
session_start();
if (!$_SESSION[login]) Header("Location: /");
at the begining of a page, before the HTML should it not redirect the page to the var in the "location:?
i have been...
i do sort of but my login page works fine so i am confused. i am successfully login them in, taking them to a URL in SQL and creatinga session with the value accesslogin.
now i just want to restrict all pages when the user has not logged in, redirecting them to the login page.
as far as your...
i must be stupid or crazy or both. i know i am very new to php but i put this at the beginning of the HTML page
<?php
session_start();
if(!$_SESSION[accesslogin]) Header("login.php");
?>
<html>
<head>
and nothing happens. am i doing this all wrong? could it be settings in php.ini? my...
i think i need to check my php.ini. i can still pull up these pages without logging in.
like i mentioned i am basically taking your advice and creating a session for each login. (specific session name- not a variable though) and i presume checking for that session at the begining of each page.
hmm. actually if the login is ok the SQL db determines the URL/path. the login.php connects to mssql so i think we may be talking about 2 different things (i could be wrong)
am i right to create a session name after successful login and then on each page in my directory check for the session...
thanks. i got really busy with other things. ill try this. i'm getting alot of code and a bit confused at the same time.
this is a snippet of the code from the login page->
if (($variable2 != $loginname) OR ($variable3 != $passwd))
{
echo "<font...
Hey, I'm going bonkers with this one. Below I am creating a session named 'accesslogin' once the user successfully logs in.
This is the latter part of the code...
if (($variable2 != $loginname) OR ($variable3 != $passwd))
{
echo "<font size=4...
i have a bit of simple code you can hack.
<?
$hostname = "yoursite.com"; // Host name.
$username = "username"; // Your database login name
$password = "password"...
right that makes sense. my login form is login.htm and POSTS to login.php. i would create the session in the php page i assume.
also when you say 'At the beginning of each page, check that the variable has been set, if not take them to the login page.' you mean the pages in my 'secure' folder...
i have created a basic php login script that connects to mssql and takes users to a specific path/url on my IIS5 box if the password and username match.
i now realized that once you get to the url you can easily bookmark it and avoid the login page alltogether. how would i restrict access to...
newbie here doing a basic login using php4 and mssql. I am getting 'HTTP 405 - Resource not allowed' my login page is login.htm defined to 'post' to login.php4. I installed php4 on IIS5 with Win2k Server.
My site 'home directory' tab in IIS lists script source access and permission to execute...
newbie here doing a basic login using php4 and mssql. I am getting 'HTTP 405 - Resource not allowed' my login page is login.htm defined to 'post' to login.php4. I installed php4 on IIS5 with Win2k Server.
My site 'home directory' tab in IIS lists script source access and permission to execute...
i'm running in circles with the tell target and load movie concepts. i have a small flash movie (in a table) and am trying to load an entirely different (larger) movie from a button on the smaller movie. the two movies are in seperate HTML pages.
ive used load movie using layers and targets but...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.