Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require 'connect.php';
- $pesel = addslashes($_POST['pesel']);
- $password = addslashes($_POST['password']);
- $sql = "SELECT * FROM passwords WHERE id_user='".$pesel."' AND password='".$password."'";
- $result = $conn->query($sql);
- if ($result->num_rows > 0) {
- // tutaj kod na rozpoczęcie sesji
- session_start();
- $sql2 = "DELETE FROM passwords WHERE id_user='".$_POST['pesel']."'";
- $result = $conn->query($sql2);
- $_SESSION["zalogowany"]=1;
- header('Location: Glosowanie/home.php');
- }
- else {
- echo "Błąd";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement