Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ini_set('display_errors', 1);
- ini_set('display_startup_errors', 1);
- error_reporting(E_ALL);
- printf("Siema");
- $link = mysqli_connect("localhost", "root", "root", "instytut");
- if (!$link) {
- printf("Connect failed: %s\n", mysqli_connect_error());
- exit();
- }
- $username = $_POST['username'];
- $password = $_POST['password'];
- $create = in_array('create_account', $_POST);
- printf("%s, %s, %s", $username, $password, $create);
- /*
- $login_query = sprintf("SELECT pass_hash from User WHERE username='%s', $username);
- $result = mysqli_query($link,$login_query);
- if (!$result) {
- printf("Query failed: %s\n", mysqli_error($link));
- //exit(1);
- }
- if (mysqli_num_rows($result) == 0){
- printf("Username not found");
- //exit(2);
- }
- print("%s", $result);
- */
- ?>
Add Comment
Please, Sign In to add comment