SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Evangelist TomTees's Avatar
    Join Date
    Apr 2010
    Location
    Iowa
    Posts
    553
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Questions about $_POST array

    1.) What type of array is the $_POST array?

    2.) How do I see the contents of the entire $_POST array?

    3.) Is there a way to see the Field Name (on the Form) and the Value that a User enters into the Form for each Control?

    Thanks,


    TomTees

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TomTees View Post
    1.) What type of array is the $_POST array?
    An array...

    2.) How do I see the contents of the entire $_POST array?
    var_dump() and print_r()
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    SitePoint Member
    Join Date
    Aug 2009
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TomTees View Post
    1.) What type of array is the $_POST array?

    2.) How do I see the contents of the entire $_POST array?

    3.) Is there a way to see the Field Name (on the Form) and the Value that a User enters into the Form for each Control?

    Thanks,


    TomTees
    1. It's an associative array.
    See http://www.tizag.com/phpT/arrays.php

    2.

    Code:
    <pre>
    <?php print_r($_POST); ?>
    </pre>

    3. The above will show you the field name and value.

  4. #4
    SitePoint Enthusiast
    Join Date
    Sep 2010
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Number 2 in the above post FTW!!!

    I find print_r to be the saviour of my sanity!!! 9 times out of ten i can see where i am going wrong when i look at whats held in the array!


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
  •