Add exams from exam58 to exam98

This commit is contained in:
2024-05-08 13:49:37 +02:00
parent 1bfdab1994
commit 4fd956ddac
39 changed files with 481 additions and 0 deletions

27
exam96/encryption.php Normal file
View File

@@ -0,0 +1,27 @@
<?php
if (isset($_POST['password']) && !empty($_POST['password'])) {
$pass = md5($_POST['password']);
$filename = 'hash.txt';
$handle = fopen($filename,'r');
$file_pass = fread($handle,filesize($filename));
if($pass == $file_pass){
echo 'Password ok!';
}else{
echo 'Incorrect passwrod';
}
} else{
echo 'Please enter the password!';
}
?>
<form action="encryption.php" method="POST">
Password:<input type="text" name="password"><br><br>
<input type="submit" value="Submit">
</form>