I am using jQuery to submit a form to a php file, a simple script to check user details.
var emailval = $("#email").val(); var invoiceIdval = $("#invoiceId").val(); $.post("includes/verify.php", {invoiceId:invoiceIdval , email:emailval }, function(data) {
PHP code:
<?php print_r($_POST); ?>
I am looking at the answer in firebug, this is an empty array. An array must have at least some value.
I can not understand why $_POST does not work in php file. Firebug shows a message containing content sent by email and account ID, only nothing was received in the php file.
The form:
<form method="post" action="<?=$_SERVER['PHP_SELF']; ?>" enctype="application/x-www-form-urlencoded">
Does anyone know what he is doing?
thanks
found this - http://www.bradino.com/php/empty-post-array/
what's the reasonable way?
source share