Kingston_Pendrive/Suli/13.b/Backend/2024. 10. 17/func.php

25 lines
553 B
PHP
Raw Permalink Normal View History

2024-11-19 18:04:02 +00:00
<?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;
}
?>