0

When I'm trying to run this through Netbeans it shows notice errors, but the form is displayed correctly and works fine. Why could it show the errors?

<html>

    <head>
        <title>Form Validation with Multiplication</title>
    </head>

    <body>

    <?php

        if(!empty($errors))
        {
            echo join('<br />', $errors);
        } 
        elseif(isset($_POST)) 
        {
            $value = ($_POST['number1'] * $_POST['number2']);
            echo 'The Multiplication is: '.$value.'<br />';
        }
    ?>

    <form method="post" action="">
        Enter the Number 1 <input type="text" name="number1" value="<?php print $_POST['number1']; ?>" size="5" maxlength="5" /><br />
        Enter the Number 2 <input type="text" name="number2" value="<?php print $_POST['number2']; ?>" size="5" maxlength="5" /><br />
        <input type="submit" name="submit" value="submit" />
    </form>

    </body>

</html>
gvlasov
  • 18,638
  • 21
  • 74
  • 110
Vengat CsEngg
  • 27
  • 1
  • 5

0 Answers0