added orai

This commit is contained in:
szabomarton 2024-09-19 11:54:30 +02:00
parent 6ebd347e44
commit 7c17f4859c
2 changed files with 40 additions and 0 deletions

28
20240919/index.php Normal file
View File

@ -0,0 +1,28 @@
<?php
include 'process.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Szöveges cucc</title>
</head>
<body>
<h1>
Szöveges
</h1>
<form action="#" method="POST">
<input type="text" name="szoveg1" title="Adj meg egy szöveget.">
<br>
<button type="submit">Beküld</button>
</form>
<?php
if ($vane){
echo "<h2> SZEREPEL</h2>";
} else {
echo "<h2>NEM SZEREPEL</h2>";
}
?>
</body>
</html>

12
20240919/process.php Normal file
View File

@ -0,0 +1,12 @@
<?php
$vane = false;
$szoveg = $_POST['szoveg1'];
if (isset($szoveg) && strlen($szoveg) >= 5 ){
if (str_contains($szoveg, "alma")){
$vane = true;
}
}
?>