L
L
lilandre22017-01-11 15:36:40
PHP
lilandre2, 2017-01-11 15:36:40

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

1 answer(s)
D
display: block, 2017-01-11
@lilandre2

if (!empty($_POST['text'])) {	
  $num=(real)($_POST['text']);
  return $num;

This is where it crashes. Where to return? It's not a function.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question