Backend/20241017/func.php
2024-10-17 11:56:57 +02:00

34 lines
588 B
PHP

<?php
function check_post(){
if($_SERVER["REQUEST_METHOD"] == "POST"){
$num1 = $_POST["num1"];
$num2 = $_POST["num2"];
$_SESSION["num1"] = $num1;
$_SESSION["num2"] = $num2;
if ($num1>0&& $num2> 0){
return true;
} else{
return false;
}
} else {
return false;
}
}
function add(int $num1, int $num2){
return $num1 + $num2;
}
function add10(int $num){
return $num+=10;
}
function add11(&$num){
return $num+= 11;
}
function nincsertek($num = 100){
return $num;
}