Kingston_Pendrive/Suli/13.b/Backend/2024. 10. 17/func.php
2024-11-19 19:04:02 +01:00

25 lines
553 B
PHP

<?php
function check_post() {
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["num1"] = $_POST["num1"];
$_SESSION["num2"] = $_POST["num2"];
$num1 = $_SESSION["num1"];
$num2 = $_SESSION["num2"];
if ($num1 > 0 && $num2 > 0) {
return true;
}
else {
return false;
}
}
else {
return false;
}
}
function add($szam1, $szam2) {
return $szam1 + $szam2;
}
?>