SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Pragmatic Programmer halfasleeps's Avatar
    Join Date
    Feb 2006
    Location
    Altoona, PA. USA
    Posts
    1,945
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    why would GET work but POST not work?

    I have this form:

    HTML Code:
    <form action="process_login.php" method="post">
    					<div id="login_title">
    					Sign In
    					</div>
    					<div id="element">
    					Enter Your Email:
    					<input type="text" name="email" id="email" />
    					</div>
    					<div id="radio">
    					<input type="radio" name="have_pass" id="have_pass" value="0" checked="checked" />
    					I don't have a password
    					<br /><span>(You will have the option to create one later.)</span>
    					<br />
    					<input type="radio" name="have_pass" id="have_pass" value="1" />
    					I have a password and it is:
    					</div>
    					<div id="element">
    					<input type="password" name="password" id="password" />
    					</div>
    					<div id="element">
    					<INPUT TYPE="image" name="proceed" value="proceed" SRC="images/proceed_button.gif" width="92" height="25" BORDER="0" ALT="Proceed">
    					</div>
    					</form>
    on the process_login page i have this:

    PHP Code:
    print_r($_POST);
    print_r($_GET); 
    if i try the form as "post" i get this on the next page
    array() array()
    nothing is passed in get or post
    but if i change the method to GET then the next page looks like this:
    Array ( ) Array ( [email] => ggggg [have_pass] => 1 [password] => errrrr [proceed_x] => 40 [proceed_y] => 20 [proceed] => proceed )
    the vars do get passed when i use GET

    however this form is a login in which the user types in a password and i think this would be best as a post not a get....so why won't it work as a post???

    Thanks.
    Altoona Design
    Freelance Flex developer for hire.
    ActionScript Programmer with 8 Years Experience.

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,788
    Mentioned
    151 Post(s)
    Tagged
    3 Thread(s)
    You dont have a submit input defined.......
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  3. #3
    Pragmatic Programmer halfasleeps's Avatar
    Join Date
    Feb 2006
    Location
    Altoona, PA. USA
    Posts
    1,945
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by spikeZ View Post
    You dont have a submit input defined.......
    oh, i was using

    <INPUT TYPE="image" name="proceed" value="proceed" SRC="images/proceed_button.gif" width="92" height="25" BORDER="0" ALT="Proceed">

    as my submit....it works with get....ok thanks.
    Altoona Design
    Freelance Flex developer for hire.
    ActionScript Programmer with 8 Years Experience.


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
  •