Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $resultString = "yey";
- $loggedIn = 0;
- $servername = "mysql7.000webhost.com";
- $username = "a8305444_hexus";
- $password = "h107d321";
- $dbname = "a8305444_hexus";
- if (isset($_GET["username"])) {
- if (isset($_GET["password"])) {
- $myUsername = $_GET["username"];
- $myPassword = $_GET["password"];
- $conn = new mysqli($servername, $username, $password, $dbname);
- if ($conn->connect_error) {
- die("errnoconnect");
- }
- $sql = "SELECT * FROM users";
- $result = $conn->query($sql);
- if ($result->num_rows > 0) {
- while($row = $result->fetch_assoc()) {
- if ($row["username"] == $myUsername) {
- if ($row["password"] == $myPassword) {
- die($resultString);
- }
- }
- }
- }
- die("err");
- $conn->close();
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement