I've seen many questions about this same issue, but nothing helps me with this problem.
I'm very new to PHP and i've been trying some things with $_GET
requests to a localhost using XAMPP
and MySql
with good results, but when I use $_POST
allways get the same result.
<?php
if(isset($_POST["name"])){
echo 'Hi ' . $_POST["name"] . '!';
}else{
echo "null";
}
var_dump($_POST["name"]);
?>
null<br />
<b>Notice</b>: Undefined index: name in <b>C:\xampp\htdocs\tests\test.php</b> on line <b>8</b><br />
NULL
This is a simple test I've tried.
I send POST
request using Postman, I give the values in variables but the result is allways the same.