So i'm trying to make a proper login screen so when you click on the mysite i presents you with the log in screen, and after you logged in it presents you the actual page. the normal code goes below this
<form action="hello.html" method="POST">
<input type="text" placeholder="username" name="username"><br />
<input type="password" placeholder="password" name="password"><br />
<input type="submit" name="submit" value="Connect" />
</form>
<?php
if(isset($_POST['submit'])){ //when user click connect
if(!empty($_POST['username']) && !empty($_POST['password'])){
if ($_POST['username']=="guest" && $_POST['password']=="pwrd"){
header("Location:home.php");
} else {
echo "check the password and username";
}
} else {
echo "fill all the inputs";
}
} 14:50 09/10/2016