Re: Redirecting to a new page

From: Date: Fri, 04 Jan 2002 21:18:11 +0000
Subject: Re: Redirecting to a new page
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-15412@lists.php.net to get a copy of this message
Please note, that this is a very insecure way of determining which page a person gets to view. All they would have to do is enter the admin.php url in the browser and they get admin access even if they are not admins. Fred Matt Stewart <matt@netvirtua.com> wrote in message news:95C78551DA8AD41182CB00E018C2447E285D27@comms.netvirtua.int... > Can't find the right instructions on php.net, basically, i want a page where > someone logs in, and then according to the database entry for them, either > they are an admin user or a normal user, and it should then send them to a > page depending on which they are. > I've accessed the db ok, and checked which they are, then i've used > > if ($myrow[Admin] == "Y"){ > print "Location:admin.php"; > }else{ > print "Location:user.php"; > ) > > this doesn't sem to work - just gives a blank screen with the standard html > headers and footers, rather than the desired location page. > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.312 / Virus Database: 173 - Release Date: 31/12/01 >

« previous php.db (#15412) next »