commit ca42a1e69813d6710f19997648e26205738835f8 Author: andalevente Date: Fri Jan 27 12:03:06 2023 +0100 first commit diff --git a/bejelentkezes.html b/bejelentkezes.html new file mode 100644 index 0000000..3f983d0 --- /dev/null +++ b/bejelentkezes.html @@ -0,0 +1,36 @@ + + + + + + + + + + Bejelentkezés + + +
+
+
+

Bejelentkezés

+
+ E-mail +
+ +
+ Jelszó +
+ +

+
+ +
+ Regisztráció +
+
+
+
+
+ + \ No newline at end of file diff --git a/home.html b/home.html new file mode 100644 index 0000000..51a8882 --- /dev/null +++ b/home.html @@ -0,0 +1,17 @@ + + + + + + + Főoldal + + +
+
+

Ön sikeresen belépett az alkalmazásba!

+ Kilépéshez csak zárja be a böngészőt! +
+
+ + \ No newline at end of file diff --git a/login.php b/login.php new file mode 100644 index 0000000..cfeff18 --- /dev/null +++ b/login.php @@ -0,0 +1,52 @@ +prepare('SELECT id, jelszo FROM fiokok WHERE email = ?')) { + // Bind parameters (s = string, i = int, b = blob, etc), in our case the username is a string so we use "s" + $stmt->bind_param('s', $_POST['email']); + $stmt->execute(); + // Store the result so we can check if the account exists in the database. + $stmt->store_result(); + + if ($stmt->num_rows > 0) { + $stmt->bind_result($id, $password); + $stmt->fetch(); + // Account exists, now we verify the password. + // Note: remember to use password_hash in your registration file to store the hashed passwords. + if (password_verify($_POST['password'], $password)) { + // Verification success! User has logged-in! + // Create sessions, so we know the user is logged in, they basically act like cookies but remember the data on the server. + session_regenerate_id(); + $_SESSION['loggedin'] = TRUE; + $_SESSION['name'] = $_POST['email']; + $_SESSION['id'] = $id; + echo 'Üdvözlöm ' . $_SESSION['name'] . '!'; + } else { + // Incorrect password + echo 'Helytelen felhasználónév vagy jelszó!'; + } + } else { + // Incorrect username + echo 'Helytelen felhasználónév vagy jelszó!'; + } + + $stmt->close(); +} +?> \ No newline at end of file diff --git a/regisztracio.html b/regisztracio.html new file mode 100644 index 0000000..d38a58b --- /dev/null +++ b/regisztracio.html @@ -0,0 +1,46 @@ + + + + + + + + Regisztráció + + + + + + +
+
+
+

Regisztráció

+
+ Teljes név +
+ +
+ E-mail +
+ +
+ Jelszó +
+ +

+
+ +
+ Bejelentkezés +
+
+
+
+
+ + + \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..bdc1b43 --- /dev/null +++ b/style.css @@ -0,0 +1,5 @@ +.centerdiv{ + display: flex; + justify-content: center; + align-items: center; +} \ No newline at end of file