First of all I apologize for the noobish nature of my question. I have tried to search the internet for a solution, so far with little luck. I therefore turn to the awesome people of StackOverflow, as this usually gets the problems solved quite fast.
I am trying to make a very simple login function for a website. It consists of a HTML-form and a php login script. The problem is that the username (and password) does not seem to get passed from the form to the login script. Starting with the form, it looks like this:
<form name="loginForm" method="post" action="loginScript.php">
<table style="position: absolute; top:55%; left:50%; transform: translate(-50%, -50%)">
<tr>
<td>Brugernavn:</td><td><input name="edUsername" type="text" id="username" autofocus></td>
</tr>
<tr>
<td>Adgangskode:</td><td><input name="edPassword" type="password" id="password"><br></td>
</tr>
<tr>
<td style ="font-size: 10px;">Glemt din adgangskode?</td>
<td style="text-align: right;"><input name="Submit" type="submit" value="Log ind"></td>
</tr>
</table>
</form>
So the information i need in my login script is the username and password data. I try to obtain these with the filter_input() since I read that this was safer than $_POST[]. In the login script it looks like this:
// Get username and password from post form
$ed_user = filter_input(INPUT_POST, 'username');
$ed_pass = filter_input(INPUT_POST, 'password');
echo $ed_user;
The "echo" part is just a temporary line, to check if there is indeed a username retrieved. So far this is not the case. So my question is, what the heck am I doing wrong?