How can I get list of POST fields in a second page?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JamesB

    How can I get list of POST fields in a second page?

    I have a form on a page that is built on results from a db query. The user
    can tick boxes/edit fields etc, and then submit to a second page that will
    update the db. How do I know what my POST fields are and how many in the
    second page (I am naming my fields in the form on the first by being a
    common name with a unique ID from each record on the front, ie. each record
    has a id_name, id_email etc etc.
    Yes, I'm a bit of a newbie to this...
    James.


  • Marian Heddesheimer

    #2
    Re: How can I get list of POST fields in a second page?

    On Thu, 21 Jul 2005 10:11:01 +0100, JamesB wrote:
    [color=blue]
    >update the db. How do I know what my POST fields are and how many in the[/color]

    print_r($_POST) ;

    Marian

    --
    Barrierefreie Online-Kurse: HTML, PHP, MySQL, Word, Excel
    Lernpilot.de steht aktuell zum Verkauf! Sichern Sie sich jetzt diese wertvolle top Domain für Ihr Unternehmen.

    Comment

    • JamesB

      #3
      Re: How can I get list of POST fields in a second page?


      "Marian Heddesheimer" <080705.8.nolin k@spamgourmet.c om> wrote in message
      news:5rpud15e41 78u9bmmfs124ctg v5nqprg5i@4ax.c om...[color=blue]
      > On Thu, 21 Jul 2005 10:11:01 +0100, JamesB wrote:
      >[color=green]
      > >update the db. How do I know what my POST fields are and how many in the[/color]
      >
      > print_r($_POST) ;
      >[/color]

      Thanks for that - I seem to be doing something not quite right though! As a
      test, I put a simple html form in a page:

      <form name="form2" method="post" action="updateu sers.php">
      <input type="checkbox" name="checkbox" value="checkbox ">
      <input type="checkbox" name="checkbox2 " value="checkbox ">
      <input type="submit" name="Submit" value="Submit">
      </form>

      on the updateusers.php page I put the command you gave, but all I get is:

      Array
      (
      [Submit] => Submit
      )And not the name of the checkboxes.Same occurs with my php-built table of
      checkboxes and text fields (but I figure to get it working on something
      simple first...)James


      Comment

      • Jerry Stuckle

        #4
        Re: How can I get list of POST fields in a second page?

        JamesB wrote:[color=blue]
        > "Marian Heddesheimer" <080705.8.nolin k@spamgourmet.c om> wrote in message
        > news:5rpud15e41 78u9bmmfs124ctg v5nqprg5i@4ax.c om...
        >[color=green]
        >>On Thu, 21 Jul 2005 10:11:01 +0100, JamesB wrote:
        >>
        >>[color=darkred]
        >>>update the db. How do I know what my POST fields are and how many in the[/color]
        >>
        >>print_r($_POS T);
        >>[/color]
        >
        >
        > Thanks for that - I seem to be doing something not quite right though! As a
        > test, I put a simple html form in a page:
        >
        > <form name="form2" method="post" action="updateu sers.php">
        > <input type="checkbox" name="checkbox" value="checkbox ">
        > <input type="checkbox" name="checkbox2 " value="checkbox ">
        > <input type="submit" name="Submit" value="Submit">
        > </form>
        >
        > on the updateusers.php page I put the command you gave, but all I get is:
        >
        > Array
        > (
        > [Submit] => Submit
        > )And not the name of the checkboxes.Same occurs with my php-built table of
        > checkboxes and text fields (but I figure to get it working on something
        > simple first...)James
        >
        >[/color]

        James,

        You'll only get the checkboxes back if they are actually checked.

        Try checking one (or both) of the checkboxes before clicking on Submit.


        --
        =============== ===
        Remove the "x" from my email address
        Jerry Stuckle
        JDS Computer Training Corp.
        jstucklex@attgl obal.net
        =============== ===

        Comment

        • JamesB

          #5
          Re: How can I get list of POST fields in a second page?


          "Jerry Stuckle" <jstucklex@attg lobal.net> wrote in message
          news:cImdnbC-DKq1mn3fRVn-1A@comcast.com. ..[color=blue]
          >
          > James,
          >
          > You'll only get the checkboxes back if they are actually checked.
          >
          > Try checking one (or both) of the checkboxes before clicking on Submit.
          >[/color]

          Ah, that works. Thanks for pointing that out!


          Comment

          Working...