In html form tag, it doesn't matter whether the values are enclosed with single quotes (' ') or
double quotes(" "). My suggestion is that keep the consistency. When I started learning php/form
tag, the example code used double quotes around values. So, I am acccustomed in using double
quotes. However, as far as values are strings it's OK to use single quotes, and it is known that
using single quotes takes less time than double quotes in parsing/interpreting codes.
To test mixed using of single/double quotes, try the following code after saving it "logintest.php"
as file name. When I test this code, it works fine. This shows that your original code is OK as it is.
I don't know why it didn't work; may be it should have worked if you cleared browser cache .
PHP Code:
<html>
<form action='logintest.php' method="POST">
Username: <input type="text" name="username"><br>
Password: <input type="password" name="password"><br>
<input type="submit" value="Log in"><br>
</form>
</html>
<?php
$username = $_POST['username'];
$password = $_POST['password'];
echo $username."<br>";
echo $password;
?>