problem with header() and post data

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • anon@the.net

    problem with header() and post data

    how do i keep my $_POST data if i use something like header
    ("Location: processlogin.ph p") without using curl?
    --
    ----------------------------------------------
    Posted with NewsLeecher v3.0 Final
    * Binary Usenet Leeching Made Easy
    * http://www.newsleecher.com/?usenet
    ----------------------------------------------
  • Erwin Moller

    #2
    Re: problem with header() and post data

    nomopofom (anon@the.net) wrote:
    [color=blue]
    > how do i keep my $_POST data if i use something like header
    > ("Location: processlogin.ph p") without using curl?[/color]

    Hi,

    Well, the strict answer is: You don't.

    So you need to store it somewhere.
    Two solutions:
    - Store it in the Session

    - URL-encode the whole POST into a GET using ?
    example:

    $newloc = "processlogin.p hp?name=".urlen code($_POST["name"]);
    $newloc .= "&lastname=".ur lencode($_POST["lastname"]);

    etc.

    The really easy solution is of course: Make the form-action point to the
    right place. ;-)

    Regards,
    Erwin Moller

    Comment

    Working...