Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

function to send a user to another page 1

Status
Not open for further replies.

leegold2

Technical User
Oct 10, 2004
116
What is the function in PHP I can put into a PHP script that will send a user to another page ie. script? I don't want to to POST or GET anything just relay the user to a more updated page from an older one. Thanks.
 
it's all on the php.net site. but to save you the time:
Code:
<?
$newpage = ""; //insert full url of new page here
header("Location: $newpage");
?>

note that because this modifies the headers you must ensure that this appears before any text at all (even a blank line) is sent to the client.

if you want a redirect message to be shown to the user then you need to rely on a mixture of a link and an html-meta tag. i have posted on this before in this forum over the last couple of days.

hth
Justin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top