freakus_maximus Posted August 23, 2006 Share Posted August 23, 2006 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. Link to comment https://forums.phpfreaks.com/topic/18441-echoprint-all-variables-from-post/ Share on other sites More sharing options...
trq Posted August 23, 2006 Share Posted August 23, 2006 [code=php:0]foreach($_POST as $k => $v) { echo $k ." = ".$v."<br />";}[/code] Link to comment https://forums.phpfreaks.com/topic/18441-echoprint-all-variables-from-post/#findComment-79290 Share on other sites More sharing options...
kenrbnsn Posted August 23, 2006 Share Posted August 23, 2006 [code]<?php echo '<pre>' . print_r($_POST,true) . '</pre>'; ?>[/code]Ken Link to comment https://forums.phpfreaks.com/topic/18441-echoprint-all-variables-from-post/#findComment-79292 Share on other sites More sharing options...
lessthanthree Posted August 23, 2006 Share Posted August 23, 2006 [quote author=kenrbnsn link=topic=105362.msg420775#msg420775 date=1156348514][code]<?php echo '<pre>' . print_r($_POST,true) . '</pre>'; ?>[/code]Ken[/quote]or [code]<?phpprint "<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. :) Link to comment https://forums.phpfreaks.com/topic/18441-echoprint-all-variables-from-post/#findComment-79293 Share on other sites More sharing options...
freakus_maximus Posted August 23, 2006 Author Share Posted August 23, 2006 Each one work and told me what I needed. The "add task" variables are not being passed, only the first set.Thanks! Link to comment https://forums.phpfreaks.com/topic/18441-echoprint-all-variables-from-post/#findComment-79296 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.