Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3

Thread: Post variables

  1. #1
    Senior Member jbagley's Avatar
    Join Date
    Sep 2004
    Location
    Cape Town
    Posts
    845
    Member #
    7422
    ASP code:
    Code:
    <% set Params = Request.Form
    For Each Pvalue in Params %>
    <tr>
    <td><%=Pvalue%></td>
    <td><%=Params(Pvalue)%></td>
    </tr>
    <% next %>
    How would I do this is PHP? Print out the post variables that are passed to the page, without knowing the exact name of the variable sent?

  2.  

  3. #2
    Senior Member Richard S's Avatar
    Join Date
    Jul 2004
    Location
    SW Lonodn
    Posts
    219
    Member #
    6728
    Liked
    3 times
    I just checked and this works:

    PHP Code:
    <?
    foreach($_POST as $key=>$value)
        {
            echo 
    "<tr>
                 <td> 
    $key </td>
                 <td> 
    $value </td>
                 </tr>"
    ;

        }

    ?>

  4. #3
    Senior Member jbagley's Avatar
    Join Date
    Sep 2004
    Location
    Cape Town
    Posts
    845
    Member #
    7422
    thanks.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:51 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com