the fallowing script
<?php
echo "<form name=\"modulo\" method=\"post\" action=".$_SERVER['PHP_SELF'].">";
?>
<p>primo numero
<input name="n1" type="text">
</p>
<p>secondo numero
<input type="text" name="n2">
</p>
<p>terzo numero
<input type="text" name="n3">
</p>
<p>
<input type="submit" name="Submit" value="calcola maggiore e minore">
</p>
</form>
<?php
echo $_POST['n1'];
echo $_POST['n2'];
echo $_POST['n3'];
if (($n1>$n2) && ($n1>$n3))
{
$mag=$n1;
}
else
{
if (($n2>$n3) && ($n2>$n1))
{
$mag=$n2;
}
else
{
$mag=$n3;
}
}
echo "MAggiore: ".$mag;
?>
returns the fallowing errors:
Notice: Undefined index: n1
Notice: Undefined index: n2
Notice: Undefined index: n3
Notice: Undefined variable: n1
Notice: Undefined variable: n2
Notice: Undefined variable: n2 i
Notice: Undefined variable: n3
Notice: Undefined variable: n3
could u pls tell me what did i do wrong?
thank you for your patience.