SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Header

  1. #1
    SitePoint Enthusiast vaiod's Avatar
    Join Date
    Jan 2001
    Location
    Chandler, Arizona
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there a way to treat a header() like a post? So that all the variables I place in the header() won't be shown in the URL much like a POST instead of a GET.

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think you can, you would be better off to have php make a form with hidden inputs to hold you values, and a form tag with method POST and use javascript to submit the form on page load like

    Javascript:
    Code:
    function send_it() {
    document.form1.submit();
    }
    html/php
    PHP Code:
    <body onLoad="send_it(); ">
    <form name="form1" action="somepage.php" method="POST">
    <input type="hidden" name="email" value="<?=$email?>">
    <input type="hidden" name="dob" value="<?=$dob?>">
    </form>
    Please don't PM me with questions.
    Use the forums, that is what they are here for.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •