Either I am incredibly stupid or something is wrong with my dev environment. Ive been pulling my hair out of my head for these past few days as my form $_POST
variables are simply not getting passed.
So I have scalled it down to the most simplest of tests, just to ensure there is nothing wrong with my script, which I originally thought, which took up all my time trying to find a bug which isnt there. I tried the following and then realise it is a case where $_POST values arent getting passed
<form method="POST" name="login" action="test.php" id="loginForm">
<input type="text" name="email" placeholder="please enter email">
<input type="text" name="password" placeholder="please enter your password">
<button type="submit" name="submitBtn">SUBMIT</button>
</form>
test.php
var_dump($_POST);
$_POST['email'];
$_POST['password'];
I am hoping to get some possible solutions or advise on what I can try to further debug this.
I am using XAMPP, and PHPStorm.
var_dump($_POST)
results in NULL{}