Adult ADHD - Credit Card Debt Consolidation - Nutritional Supplements - Bad Credit Loans - Sciences in 2007

PDA

View Full Version : securing web page


ianlufc
Apr 15th 2008, 11:12 am
hi Guys

im working on a college project..have users logging in and looking through various pages

can someone tell me how to stop unauthorised people simply typeing in the full path of one of the pages and viewing it without logging in.

e.g. i log in at index.php
that brings me to main.php

but if i type server/myproj/main.php
it brings it up, is there any way of stopping this


i appreciate your help in advance
cheers

bartolay13
Apr 15th 2008, 11:16 am
use session variables

ie.

on top of your main.php

if($_SESSION['name'] == "") ? redirect to index.php

sessions will do the trick

ianlufc
Apr 15th 2008, 2:28 pm
cheers mate

JLEville
Apr 15th 2008, 2:34 pm
You could use sessions or cookies...if you don't know how to fix this, let me know and I'd be happy to do it for like 10 dollars. PM if you're interested, thanks.