Re: [PHP-LANG] Passing POST Vars

[email protected] (Jerry)
Newsgroups php.lang
Organization University of San Diego
Message-ID <[email protected]>
In article <[email protected]>, [email protected] 
("thelgm") wrote:

> Is it possible to pass variables using POST, but without the form;
> as in header(something);
> 
> or perhaps another method?

This is an odd question, or I'm missing the point. Your PHP presumably 
is running on the server, so by the time header() gets called, your 
script already has all its post variables. The header() function will 
send headers back to the client.

If you mean that you're doing a redirect from one script to another, you 
might find it easier just to put the variable in the URL: 
http://www.somewhere.ovr/?var1=val1&var2=val2&var3=val3 etc.

If you mean that you want to embed a variable into a form, just use 
hidden fields:

<input type="hidden" name="var1" value="<?php echo val1calc(); ?>">

Jerry
-- 
http://www.hoboes.com/jerry/
"Give a man a fish and you feed him for a day. Teach him to fish, and you've
depleted the lake."--It Isn't Murder If They're Yankees
(http://www.hoboes.com/jerry/Murder/)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.