Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "concept/assets/libs/php/conn.php";
- if($_SERVER["REQUEST_METHOD"] == "POST") {
- // username and password sent from form
- $myusername = $_POST['user'];
- $mypassword = $_POST['pass'];
- $sql = "SELECT * FROM users WHERE username = '$myusername'";
- $result = mysqli_query($conn,$sql);
- $count = mysqli_num_rows($result);
- if($count == 1) { // one row matched
- header("location: http://millar16.cucstudents.org/concept/"); }
- else {
- echo "Your Login Name or Password is invalid";
- } }?>
- <form action = "" method = "post">
- <input type = "text" name ="user" class ="box"
- placeholder="username" /><br /><br />
- <input type = "password" name ="pass" class ="box"
- placeholder="password" /><br/><br />
- <input type = "submit" value=" Submit "/><br /> </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement