Jump to content

Archived

This topic is now archived and is closed to further replies.

freakus_maximus

Echo/Print all variables from POST

Recommended Posts

I know I have seen this before but searched and could not make any headway.

I need to know how to basically echo/print all the variables that come through the post on my form handler page.

I have my form and all, which is dynamically adding a checkbox and text area when the user clicks "add task" but I need to see just how everything is passed and what happens if they add a task and leave it blank, etc...

If someone would not mind posting that I would really appreciate it.

Share this post


Link to post
Share on other sites
[code=php:0]
foreach($_POST as $k => $v) {
  echo $k ." = ".$v."<br />";
}
[/code]

Share this post


Link to post
Share on other sites
[code]<?php echo '<pre>' . print_r($_POST,true) . '</pre>'; ?>[/code]

Ken

Share this post


Link to post
Share on other sites
[quote author=kenrbnsn link=topic=105362.msg420775#msg420775 date=1156348514]
[code]<?php echo '<pre>' . print_r($_POST,true) . '</pre>'; ?>[/code]

Ken
[/quote]

or

[code]
<?php
print "<pre>";
print_r($_POST);
print "</pre>";
?>
[/code]


Same thing, just my preferred method of typing it, find it easier to find where I'm displaying my POST array when it's in a block like that, particularly on a busy page. :)

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.