Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("conn.php");
- if(isset($_POST['username']))
- {
- $username = $_POST["username"];
- $password = $_POST["password"];
- $firstname = $_POST["firstname"];
- $middlename= $_POST["middlename"];
- $lastname= $_POST["lastname"];
- $sql = "SELECT username, password FROM tbl_account";
- $result = mysqli_query($conn, $sql);
- if(mysqli_num_rows($result) > 0)
- {
- while($row = mysqli_fetch_assoc($result))
- {
- if($username == $row["username"] && sha1($password) == $row["password"] && $firstname == $row["firstname"] && $middlename == $row["middlename" && $lastname == $row["lastname"])
- {
- header("location: ../");
- }
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement