Re: [PHP-DB] Re: Redirecting to a new page

2002-01-16 Thread Pete Lacey

And while 'gurix' is correct, the function you're probably looking for 
is 'header()', as in header(Location: admin.php);

Cheers
Pete

Php wrote:

 hea
 a better way is to include your admin pages.
 
 if ($myrow[Admin] == Y){
  include(admin.php);
  }else{
   include(user.php)  ;
  }
 
 so you can also include at the top of this example a general header with
 menu's etc.
 
 gurix
 
 
 Matt Stewart [EMAIL PROTECTED] schrieb im Newsbeitrag
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 
yeah, i know this, but i'm just trying to get this to work before i add

 some
 
security in there - passing sessions through etc to ensure they're logged

 in
 
as admin etc.
it doesn't really have to be that secure for what i want anyway, but
probably a good job you pointed that out ;)

-Original Message-
From: Fred [mailto:[EMAIL PROTECTED]]
Sent: 04 January 2002 21:18
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: Redirecting to a new page


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 [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

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




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

---
Incoming 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


---
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


 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Re: Redirecting to a new page

2002-01-09 Thread php

hea
a better way is to include your admin pages.

if ($myrow[Admin] == Y){
 include(admin.php);
 }else{
  include(user.php)  ;
 }

so you can also include at the top of this example a general header with
menu's etc.

gurix


Matt Stewart [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 yeah, i know this, but i'm just trying to get this to work before i add
some
 security in there - passing sessions through etc to ensure they're logged
in
 as admin etc.
 it doesn't really have to be that secure for what i want anyway, but
 probably a good job you pointed that out ;)

 -Original Message-
 From: Fred [mailto:[EMAIL PROTECTED]]
 Sent: 04 January 2002 21:18
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Re: Redirecting to a new page


 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 [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  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
 



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

 ---
 Incoming 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


 ---
 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




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Re: Redirecting to a new page

2002-01-07 Thread matt stewart

yeah, i know this, but i'm just trying to get this to work before i add some
security in there - passing sessions through etc to ensure they're logged in
as admin etc.
it doesn't really have to be that secure for what i want anyway, but
probably a good job you pointed that out ;)

-Original Message-
From: Fred [mailto:[EMAIL PROTECTED]]
Sent: 04 January 2002 21:18
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: Redirecting to a new page


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 [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 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




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

---
Incoming 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
 

---
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
 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: Redirecting to a new page

2002-01-04 Thread George Nicolae

 if ($myrow[Admin] == Y){
 header (Location:admin.php);
 }else{
 header (Location:user.php);
 }

--


Best regards,
George Nicolae
IT Manager
___
X-Playin - Professional Web Design
www.x-playin.f2s.com



Matt Stewart [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 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




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: Redirecting to a new page

2002-01-04 Thread Fred

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 [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 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




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]