Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Nov 2004
    Posts
    95
    Thanks
    0
    Thanked 0 Times in 0 Posts

    form acting like a get instead of a post...

    PHP Code:
    <form id="veaccounts" name="veaccounts" action="">
        <table align="center" border="1" width="200px">
          <tr>
        <td>
          <form id="searchlimit" name="searchlimit" action="admin.php?ICD=veaccounts&SectionID=listaccounts&ListID=<?php $_GET['ListID'?>" method="post">
            Show per page
            <select name="limitlist">
              <option value="5">5</option>
              <option value="10">10</option>
              <option value="15">15</option>
              <option value="20">20</option>
              <option value="25">25</option>
              <option value="30">30</option>
              <option value="35">35</option>
              <option value="40">40</option>
            </select>
            <input type="submit" value="search">
          </form>
        </td>
          </tr>
        </table>
      <table border="1px" align="center">
        <tr>
          <td>First Name</td>
          <td>Last Name</td>
          <td>Username</td>
          <td>Disabled</td>
          <td>Options</td>
        </tr>
        <?php
          
    //viewaccounts($_GET['ListID']);
        
    ?>
      </table>
    </form>
    for some reason my form is acting like a get instead of a post. I set the action and the method to post but it's still acting like a get. Searchlimit limit is the form that i'm having the problem with.

  • #2
    New Coder
    Join Date
    Nov 2004
    Posts
    95
    Thanks
    0
    Thanked 0 Times in 0 Posts
    anyways i figured out the problem, I have nested forms and since the first form action is null it's assuming get.

  • #3
    Senior Coder
    Join Date
    Jul 2004
    Location
    New Zealand
    Posts
    1,315
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Just in case you don't know, you can't have nested forms.

  • #4
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Also, adding method="post" or method="get" is a great way to make sure it does what you want it too....

    Dan


  •  

    Posting Permissions

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