![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 7 Pomógł: 0 Dołączył: 15.06.2019 Ostrzeżenie: (0%) ![]() ![]() |
Ten post edytował costunapisalem 15.06.2019, 16:19:22 |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 7 Pomógł: 0 Dołączył: 15.06.2019 Ostrzeżenie: (0%) ![]() ![]() |
<!DOCTYPE HTML> <html lang="pl"> <head> <meta charset="utf-8"/> </head> <body> <?php if ((!isset($_POST['login'])) || (!isset($_POST['haslo']))) { header('Location: index.php'); exit(); } require_once "baza.php"; $polaczenie = @new mysqli($host, $db_user, $db_password, $db_name); if ($polaczenie->connect_errno!=0) { echo( "Error: ".$polaczenie->connect_errno); } else { $login = $_POST['login']; $haslo = $_POST['haslo']; $login = htmlentities($login, ENT_QUOTES, "UTF-8"); $haslo = htmlentities($haslo, ENT_QUOTES, "UTF-8"); if ($rezultat = @$polaczenie->query( sprintf("SELECT * FROM piekarnia WHERE BINARY user='%s' AND BINARY pass='%s'", mysqli_real_escape_string($polaczenie,$login), mysqli_real_escape_string($polaczenie,$haslo)))) { $ilu_userow = $rezultat->num_rows; if($ilu_userow>0) { $_SESSION['zalogowany'] = 1; $wiersz = $rezultat->fetch_assoc(); $_SESSION['id'] = $wiersz['id']; $_SESSION['user'] = $wiersz['user']; unset($_SESSION['blad']); $rezultat->free_result(); header('Location: strGlow.php'); $polaczenie->close(); exit; } else { $_SESSION['blad'] = '<span style="color:red">Nieprawidłowy login lub hasło! Spróbój ponownie.</span>'; $polaczenie->close(); header('Location: /index.php'); exit(); } } $polaczenie->close(); } ?> </body> </html> to jest calutki kod. |
|
|
![]() ![]() |
![]() |
Aktualny czas: 14.10.2025 - 05:55 |