Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Tek13login</title>
- </head>
- <body>
- <form action = "tek13login.php" method = "post">
- Username :<input type="text" = name = "username">
- Password :<input type="password" = name = "password">
- <br>
- <input type = "submit" value = "login">
- </form>
- <?php
- $conn = mysql_connect('localhost', 'root', '') or die(my_sql_error);
- $databas = mysql_select_db('tek13login', $conn);
- echo "Connect tek13login är okej.";
- $users = mysql_query("SELECT * FROM userinfo");
- while($row = mysql_fetch_array($users)){
- if(($row["username"] == $_POST["username"]) && ($row["password"] == $_POST["password"]))
- echo "<br> Välkommen";
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement