On Mar 14, 2005, at 2:26 AM, Ken wrote:
On Mon, 14 Mar 2005 01:43:09 -0800 (PST), Yemi Obembe <fickledreams@xxxxxxxxx> 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 error....include() 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