first commit
This commit is contained in:
8
Suli/13.b/Backend/Fölki/negy/footer.php
Normal file
8
Suli/13.b/Backend/Fölki/negy/footer.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
echo '<div style="position: absolute; bottom: 3px; width: 100%;
|
||||
text-align: center; height: 30px; background: black; color: white;">
|
||||
Készítette: Fölker Csaba (c)2024.
|
||||
</div>';
|
||||
|
||||
|
||||
?>
|
||||
2
Suli/13.b/Backend/Fölki/negy/logged.php
Normal file
2
Suli/13.b/Backend/Fölki/negy/logged.php
Normal file
@@ -0,0 +1,2 @@
|
||||
<h3>Üdvözöllek <?php echo $nev; ?></h3>
|
||||
<a href="negy.php">Kijelentkezés</a>
|
||||
5
Suli/13.b/Backend/Fölki/negy/loginform.php
Normal file
5
Suli/13.b/Backend/Fölki/negy/loginform.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<form method="POST">
|
||||
Login: <input type="text" name="nev" title="Add meg a neved"><br>
|
||||
Jelszó: <input type="password" name="jelszo" title="Jelszó"><br>
|
||||
<button type="submit">Belépés</button>
|
||||
</form>
|
||||
21
Suli/13.b/Backend/Fölki/negy/negy.php
Normal file
21
Suli/13.b/Backend/Fölki/negy/negy.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php require 'negy1.php'; ?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="hu">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Alap web valami</title>
|
||||
</head>
|
||||
<body>
|
||||
<?php require 'footer.php'; ?>
|
||||
<h1>POST használata </h1>
|
||||
<?php
|
||||
if ($islogin==false)
|
||||
require 'loginform.php';
|
||||
else
|
||||
require 'logged.php';
|
||||
?>
|
||||
<?php require 'footer.php'; ?>
|
||||
</body>
|
||||
</html>
|
||||
16
Suli/13.b/Backend/Fölki/negy/negy1.php
Normal file
16
Suli/13.b/Backend/Fölki/negy/negy1.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
$islogin = false;
|
||||
|
||||
if (isset($_POST["nev"]) && isset($_POST["jelszo"])){
|
||||
$nev = $_POST["nev"];
|
||||
$jelszo = $_POST["jelszo"];
|
||||
if (strlen($nev)>3 && strlen($jelszo)>4)
|
||||
if ($nev == 'admin' && $jelszo=='admin')
|
||||
{
|
||||
$islogin = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user