faqts : Computers : Programming : Languages : PHP : Common Problems : Forms and User Input : URLs and Post or Get Methods

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

8 of 122 people (7%) answered Yes
Recently 0 of 10 people (0%) answered Yes

Entry

How do I send POST values through a Header() redirection?

Jan 11th, 2004 11:57
John Sinclair, Tri Bui,


This is an easy way I often use:

echo '<meta http-equiv="refresh" content="0;URL='.$PHP_SELF.'?action=list">';

But more to the point of your question, use header(Location: ... ) which is 
detailed in the php online manual at 
http://us2.php.net/manual/en/function.header.php

Try this:
header('Location: program.php?name=Harry&age=22');

or use a string as in:
header('Location: path/program.php?'.$string_of_values);