print passed variables ..

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tsg
Forum Contributor
Posts: 142
Joined: Sun Jan 12, 2003 9:22 pm
Location: SE, Alabama
Contact:

print passed variables ..

Post by tsg »

Isn't there a way to print out all variables passed in a form without having to code it? Like have a page automatically print out everything that was in a form. This would be for error checking only.

Thanks,
Tim
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

what about

Code: Select all

print_r($_POST); // or $_GET or $_REQUEST
?
tsg
Forum Contributor
Posts: 142
Joined: Sun Jan 12, 2003 9:22 pm
Location: SE, Alabama
Contact:

Post by tsg »

Yes, that's it.

Thank you Volka

Tim
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

Perhaps obvious, but add <pre>...</pre> tags around it for better readability...
Post Reply