added orai
This commit is contained in:
parent
6ebd347e44
commit
7c17f4859c
28
20240919/index.php
Normal file
28
20240919/index.php
Normal 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
12
20240919/process.php
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
$vane = false;
|
||||||
|
|
||||||
|
$szoveg = $_POST['szoveg1'];
|
||||||
|
if (isset($szoveg) && strlen($szoveg) >= 5 ){
|
||||||
|
if (str_contains($szoveg, "alma")){
|
||||||
|
$vane = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
Loading…
Reference in New Issue
Block a user