i am trying to login but it seems that my variables dont contain anthing. i encountered this problem before but i managed to fix that , name attribute was missing in my html form that time..but this time don't know where am i doing wrong .plz help?
here is my html snippet. its returning blank even after i submit:
<form action="onlogin.php" method="post">
<h1>Login Form</h1>
<div>
<input type="text" placeholder="Username" required="" name="username" />
</div>
<div>
<input type="password" placeholder="Password" required="" name="password" />
</div>
<div>
<input type="submit" value="Log in" />
<a href="#">Lost your password?</a>
<a href="signup.html">Register</a>
</div>
</form>
and my php snippet is:
<?php
include ("config/config.php");//connects to db successfully
if(isset($_POST["submit"]))
{
$username = $_POST['username']; echo "$username";
$password = $_POST['password']; echo "$password";
}
?>***