This commit is contained in:
jakub
2026-01-13 00:24:42 +01:00
parent 4ff7a7c3b1
commit f0ebb9cf18
18 changed files with 3123 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<?php
?>
<!doctype html>
<html lang="pl">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta charset="UTF-8">
<title>Z40 - Jagoda</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Zadanie Z40</h1>
<h2>Autor: Jakub Grzegorczyk</h2>
</header>
<div class="box">
<p>Napisz program, który dla stałej haslo=Jagoda sprawdza czy wprowadzony z klawiatury ciąg znaków jest zgodny z hasłem.</p>
</div>
<div class="box">
<form action="index.php" method="post">
<fieldset>
<label for="haslo">Podaj hasło:</label>
<input type="password" name="haslo" id="haslo" required>
</fieldset>
<button type="submit">Wyślij</button>
</form>
</div>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$haslo = htmlspecialchars($_POST['haslo']);
echo '<div class="box">';
if ($haslo == 'Jagoda') {
echo "Hasło jest prawidłowe";
} else {
echo "Hasło <i>{$haslo}</i> jest błędne";
}
}
?>
</body>
</html>