Home > Archive > PHP Language > September 2006 > HELP!--posting variables using redirect function
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
HELP!--posting variables using redirect function
|
|
| Sunusi Ringim 2006-09-24, 6:57 pm |
| hi
am realy stuck with this problem, i want to submit variables within a
script, i understnd that the redirect( ) submit the variables using GET, but
i want thm POSTed. pls any idea how i cld achieve this? thnx lots in
advance.
| |
|
| Zebrawszy mysli Sunusi Ringim <sunusiringim@tesco.net> wyklepal:
> am realy stuck with this problem, i want to submit variables within a
> script, i understnd that the redirect( ) submit the variables using
> GET, but i want thm POSTed. pls any idea how i cld achieve this? thnx
> lots in advance.
make form
<form name="test" method="post" action="redirect_file.php">
<input type="text" name="something" id="something" value="yourValue" />
| |
|
|
Sunusi Ringim wrote:
> hi
> am realy stuck with this problem, i want to submit variables within a
> script, i understnd that the redirect( ) submit the variables using GET, but
> i want thm POSTed. pls any idea how i cld achieve this? thnx lots in
> advance.
You can't. HTTP does not allow it.
C.
| |
|
| On Sun, 24 Sep 2006 20:41:40 GMT, Sunusi Ringim wrote:
>hi
> am realy stuck with this problem, i want to submit variables within a
>script, i understnd that the redirect( ) submit the variables using GET, but
>i want thm POSTed. pls any idea how i cld achieve this? thnx lots in
>advance.
I'd save the variables in a $_SESSION variable (or array if you're
passing more than one set of values). eg:
$test = array('value_1'=>1.25, 'value_2'=>7.55, 'value_3'=>6.25);
$_SESSION['redirected_values'] = $test;
Do the redirect ...
Then read back your values:
$value_1 = $_SESSION['redirected_values']['value_1'
];
Adam.
| |
| Mumia W. (reading news) 2006-09-25, 6:57 pm |
| On 09/24/2006 03:41 PM, Sunusi Ringim wrote:
> hi
> am realy stuck with this problem, i want to submit variables within a
> script, i understnd that the redirect( ) submit the variables using GET, but
> i want thm POSTed. pls any idea how i cld achieve this? thnx lots in
> advance.
>
>
You can use CURL to construct and issue POST requests within your PHP
script.
Or perhaps you only want to convince the browser to resubmit a posted
form to a new location, in which case, you can use a status 307
Temporary Redirect.
HTTP Specification:
ftp://ftp.isi.edu/in-notes/rfc2616.txt
--
paduille.4058.mumia.w@earthlink.net
|
|
|
|
|