I have a post method in a form on one page, and a test on the second. The test is not receiving my POST.
Form:
<div class="widget">
<h2>Log in / Register</h2>
<div class="inner">
<form action="login.php" method="POST">
<ul id="login">
<li>
Username:<br>
<input type="text" name"username">
</li>
<li>
Password:<br>
<input type="password" name"password">
</li>
<li>
<input type="submit" value="Log In">
</li>
<li>
<a href="register.php">Register</a>
</li>
</ul>
</form>
</div>
And the login.php code:
<?php
include 'core/init.php';
if (empty($_POST) === false) {
$username = $_POST['username'];
$password = $_POST['password'];
echo 'testing ', $username, ' ', $password;
}
?>
core/init.php:
<?php
session_start();
require 'database/connect.php';
require 'functions/users.php';
$errors = array();
?>
connect.php (with sensitive data censored)
<?php
$connect_error = 'trouble!';
mysql_connect('localhost', '***', '***') or die($connect_error);
mysql_select_db('***') or die($connect_error);
?>
users.php is blank
Can someone tell me what I got wrong?