Alex Rivera | Logout

Echo an $_POST in PHP

Asked 2010-06-08T23:44:48.597
12

How can I print a $_POST?

Example:

echo $_POST['data'];

This returns nothing...

Edit
Report

1 Answer

8

Your code is correct.

You can use either:

var_dump($_POST);

or

print_r($_POST);

to print out the entire POST array for debugging.

answered 2010-06-08T23:48:58.247

Your Answer