Answer the question
In order to leave comments, you need to log in
After pressing the Send button returns a blank page in php. What have I done wrong?
<!DOCTYPE html>
<html>
<head>
<title> Test 1</title>
</head>
<body>
<?php
if (!empty($_POST['text'])) {
$num=(real)($_POST['text']);
return $num;
if (is_float($num)) {
if ($num >=10 ) {
$flor='Чисо находится в интервале от одного до десяти';
return $flor;
# code...
}
if ($num <=11 && $num >=20) {
$flor='Чисо находится в интервале от одного до десяти';
return $flor;
# code...
}
if ($num <=21 && $num >=50) {
$flor='Чисо находится в интервале от одного до десяти';
return $flor;
# code...
}
# code...
}
# code...
}else{
echo "Fucking bug";
}
echo 'Num is '.$flor.'<br>';
echo('<pre>');
print_r($_POST['text']);
echo('<pre>');
var_dump($num);
echo "strdsing";
?>
<form method="post" action="">
<input type="text" name="text">
<button type='submit' name='but' value="Value"> Send</button>
</form>
<?php //echo $num;
?>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
if (!empty($_POST['text'])) {
$num=(real)($_POST['text']);
return $num;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question