This is my PHP and HTML:
<?php
if(isset($_POST['submit'])){
$user = $_POST['username'];
$pwrd = $_POST['pwrd'];
include('db_connect.php');
if(empty($user) || empty($pwrd)){
echo 'Please enter all the required information to proceed';
}
}
?>
<form action="login.php" method="post">
<input type="text" name="username" placeholder="Username">
<p></p>
<input type="password" name="pwrd" placeholder="Password">
<p></p>
<input type="submit" value="Log In">
</form>
Currently when someone leaves one of the text input fields empty, it's meant to display the error 'Please enter all the required information to proceed' - it doesn't seem to be doing that though.
Help would be appreciated.