I'm trying to put a login script together... but I'm having issues with the first bit.. I've included a database connection file.. now I'm trying to make sure the user does not leave the fields blank.. here is the code:
<?php
// create database connection
$db = include 'dbcon.php';
// executes code if and when form has been submitted
if(isset($_POST['submit'])){
if(empty($_POST['username']) || empty($_POST['password'])) {
echo 'Error!' ; }
}
?>
The problem I'm having is that it won't print out the echo messages.. why is it doing this?