代码如下:为什么提交的时候总是显示:My small!
<?php
if ($_POST["age3"] < $_POST["age4"]) {
 echo "My big!";
}else {
echo "My small!";
}
?>

解决方案 »

  1.   

    <html>
    <head><title>PHPINFOMATION</title></head>
    <body text="gray" link="red" alink="blue" vlink"green">
    <form action="action1.php" method="post">
    <input type"text" name="age_3">
    <input type="text" name="age_4"><p>
    <input type="submit">
    <input type="reset">
    </form>
    </body>
    </html>
      

  2.   

    第一个文件为:
    <html>
    <head><title>PHPINFOMATION</title></head>
    <body text="gray" link="red" alink="blue" vlink"green">
    <form action="action1.php" method="post">
    <input type"text" name="age_3">
    <input type="text" name="age_4"><p>
    <input type="submit">
    <input type="reset">
    </form>
    </body>
    </html>action1.php文件为:<?php
    if ($_POST["age3"] < $_POST["age4"]) {
     echo "My big!";
    }else {
    echo "My small!";
    }
    ?>为什么提交的时候总是显示:My small!
      

  3.   

    age_4 和age_3 有个下划线
      

  4.   

    if ($_POST["age3"] < $_POST["age4"])这里少了下划线