faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

17 of 31 people (55%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

How do you push a url with PHP?

Aug 16th, 2002 10:05
Alex Dean, Erich Kolb, Mark Kesley,


I believe if you do something like this:
<?php
header("Location: http://www.example.com/");
?>
It will do what you want it to.
Also, be sure that you haven't sent anything to the browser (even
whitespace) before sending a header or you'll get an error.  If you have
to output something before sending the header, look at the output
control functions in the PHP manual.