国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

PHP newbie questions: Use custom functions for addition, subtraction, multiplication and division
Oxygen
Oxygen 2020-03-06 20:56:55
0
1
1124
這個代碼為什么沒法運行呢? 網頁直接無法顯示
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>計算</title>
</head><body>
<form method="post">
     <input type="text" name="number1">
     <select name=lable size=1 face="黑體">
      <option>+</option>
      <option>-</option>
      <option>*</option>
      <option>/</option>
      </select>
    <input type="text" name="nunber2">
    <input type="submit" name="button" value="提交">
 
</form>
<? php
 function yx ($s1,$s2,$b)
   { 
  if($b=="+")
  return ($s1+$s2);
     else if ($b=="-")
  return ($s1-$s2);
     else if ($b=="*")
  return ($s1*$s2);
  else
  return($s1/$s2);
          }
 if(isset($_POST['button'])) 
 $s1=$_POST["number1"]; 
 $s2=$_POST["number2"]; 
 $b=$_POST["lable"]; 
     if(is_nameric($s1)&&is_nameric($s2))
  $r=yx($s1,$s2,$b);
  echo "結果為".$r;
   else 
   echo "請重新輸入";
?>
</body>
</html>


Oxygen
Oxygen

reply all(1)
老洪

I'll answer you after I get on the plane

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template