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

2002-01-04 Thread Miles Thompson

Matt,

Instead of print you want to issue a header(). Check the manual for 
various caveats.

Miles


At 01:57 PM 1/4/2002 +, matt stewart wrote:
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 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] Redirecting to a new page

2002-01-04 Thread Roel Mulder

Hi Matt,

http://nl.php.net/manual/nl/function.header.php

Note: HTTP/1.1 requires an absolute URI as argument to Location: including 
the scheme, hostname and absolute path.

Thus, print Location:http:/www.host.com/admin.php; should work.
Regards,
Roel Mulder

At 13:57 04-01-2002 +, you wrote:
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.

Mulder Technisch Advies
Postbus 69
NL-2740 AB  WADDINXVEEN
tel. 0182-640184 fax. 0182-640185
http://www.mta.nl


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