Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ini_set("display_errors", "1");
- error_reporting(E_ALL);
- session_start();
- $host = "localhost";
- $username = "sh150011";
- $password = "teeheee";
- $db_name = "sh150011_music";
- ($GLOBALS["___mysqli_ston"] = mysqli_connect("$host", "$username", "$password"))or die($error1);
- ((bool)mysqli_query($GLOBALS["___mysqli_ston"], "USE $db_name"))or die($error2);
- $postlogin = $_POST['username'];
- $postpassword = $_POST['password'];
- $data = mysqli_fetch_object(mysqli_query($GLOBALS["___mysqli_ston"],
- "SELECT *,UNIX_TIMESTAMP(`online`) AS `online` FROM `users`
- WHERE `login`='{$postlogin}' AND `pass`=MD5('{$postpassword}')"));
- if (isset($_POST["username"]) or isset($_POST["password"])) {
- sleep(1);
- if ($data) {
- $return_arr["status"] = 1;
- } elseif($_POST['inloggen'] AND !$data) {
- $return_arr["status"] = 0;
- } //end else
- else{
- $return_arr["status"] = 0;
- }
- echo json_encode($return_arr); // return value
- exit();
- }
- ?>
Add Comment
Please, Sign In to add comment