[PHP-DB] redirecting function

2005-03-14 Thread Yemi Obembe
hi folks,
who knows any function that can do this javascript trick
script
window.location='http://somewhere.com/'
/script
tried header(location:http://somewhere.com/) but it gave me an 
errorinclude() on the other hand only includes the url  doest redirect to 
it...
thnx



-

A passion till tomorrow,
Opeyemi Obembe | ng.clawz.com






-
Do you Yahoo!?
 Make Yahoo! your home page   

Re: [PHP-DB] redirecting function

2005-03-14 Thread Ken
you forgot the quotation marks on header i believe

header('location: www.foobar.com');

and also make sure your browser supports header redirects, not all browsers do.


On Mon, 14 Mar 2005 01:43:09 -0800 (PST), Yemi Obembe
[EMAIL PROTECTED] wrote:
 hi folks,
 who knows any function that can do this javascript trick
 script
 window.location='http://somewhere.com/'
 /script
 tried header(location:http://somewhere.com/) but it gave me an 
 errorinclude() on the other hand only includes the url  doest redirect 
 to it...
 thnx
 
 -
 
 A passion till tomorrow,
 Opeyemi Obembe | ng.clawz.com
 
 
 -
 Do you Yahoo!?
  Make Yahoo! your home page


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] redirecting function

2005-03-14 Thread Ben Galin
On Mar 14, 2005, at 2:26 AM, Ken wrote:
On Mon, 14 Mar 2005 01:43:09 -0800 (PST), Yemi Obembe
[EMAIL PROTECTED] wrote:
hi folks,
who knows any function that can do this javascript trick
script
window.location='http://somewhere.com/'
/script
tried header(location:http://somewhere.com/) but it gave me an 
errorinclude() on the other hand only includes the url  doest 
redirect to it...

you forgot the quotation marks on header i believe
header('location: www.foobar.com');
and also make sure your browser supports header redirects, not all 
browsers do.
Also, from http://us4.php.net/header:
Remember that header() must be called before any actual output is 
sent, either by normal HTML tags, blank lines in a file, or from PHP. 
It is a very common error to read code with include(), or require(), 
functions, or another file access function, and have spaces or empty 
lines that are output before header() is called. The same problem 
exists when using a single PHP/HTML file.

Ben
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php