This is more of a curiosity question than anything but I was wondering if it is possible to force variables to be POSTed from PHP?
An example might be if the index.php page of your site was accessed and you wanted to send the user to page X with a variable, but send along a POST variable with the redirecting instead of a GET variable.
Another example might be if someone attempted to log-in to their account but the username or password was invalid. PHP would the bounce the user back to the page they came from with the error message variable as POST and not tagged onto the end of the URI with GET.
I'm not too sure if this can be done with header() or not... or if it can be done at all.
Header() POSTed variables
Moderator: General Moderators
- scorphus
- Forum Regular
- Posts: 589
- Joined: Fri May 09, 2003 11:53 pm
- Location: Belo Horizonte, Brazil
- Contact:
Re: Header() POSTed variables
You can use a form with hidden fileds and use javascript to submit it.Gen-ik wrote:or if it can be done at all.
But with header()... ca't help you yet.
Cheers,
Scorphus.
Found the link viewtopic.php?t=7063
BTW the function 'httpParseResponse' in my code is incorrect. It explodes by \r\n\r\n when it should just split the headers from the content at the first occurrance of \r\n\r\n
BTW the function 'httpParseResponse' in my code is incorrect. It explodes by \r\n\r\n when it should just split the headers from the content at the first occurrance of \r\n\r\n