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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

POST variables with header?

Status
Not open for further replies.

youradds

Programmer
Jun 27, 2001
817
GB
Ok, at the moment I am using the following to redirect to a new page;

header("Location: buy3.php");

Basically, what I would like to be able to do is redirect a load of variables across to it via the POST method. I could just add things like buy3.php?something=$something, but I was hoping to be able to 'hide it' a bit more instead of directly showing it in the query string.

Does anyone know if this is possible, and if so, how? I've been searching for ages, and havn't come across anything yet.

Thanks

Andy
 
you can use a page as simple as this:

<body onload=&quot;myform.submit()&quot;>
<form name=myform action=buy3.php method=post>
<input type=hidden name=&quot;var1&quot; value=&quot;value1&quot;>
<input type=hidden name=&quot;var2&quot; value=&quot;value2&quot;>
...
</form>
</body>

This works the same way posting values to the buy3.php script.

Attention, don't use double_quotes explicit. If you need to use them you MUST use sessions to take info to buy3.php instead of posting the values. Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top