Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //include connection file
- include('connect.php');
- //sanitize input
- $username = (strip_tags($_POST['username']));
- $password = (strip_tags($_POST['password']));
- //check password and username are correct
- if($username&&$password) {
- if(isset($_POST['submit'])) {
- if($username==$dbusername&&$password==$dbpassword) {
- echo "You have successfully logged in";
- } else {
- echo "The username and password you entered is incorrect";
- }
- } else {
- echo "You did not complete the form";
- }
- } else {
- echo "You did not enter a username or password";
- }
- ?>
Add Comment
Please, Sign In to add comment