note 102940 deleted from function.imagecolorsforindex by danbrown
| From: | danbrown@php.net | Date: | Tue, 15 Mar 2011 16:33:51 +0000 |
| Subject: | note 102940 deleted from function.imagecolorsforindex by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-177916@lists.php.net to get a copy of this message | ||
Note Submitter: ditiseenrarevraag at live dot com
----
<html>
<body>
Ik kan voor jou de tafel geven.<BR>
Vul een getal in en zeg tot hoever ik moet gaan (tot 10 x of to 30 x of tot .....)
<form name="input" action="<?php echo
$_SERVER['PHP_SELF'];?>" method="post">
De tafel van: <input type="text" name="tafel" /><BR>
De tafel moet gaan tot: <input type="text" name="aantal" />
<input type="submit" name="versturen" value="Submit" />
</form>
<hr/>
</body>
</html>
<?php
if (!empty($_POST['tafel']) && !empty($_POST['aantal']))
{
$tafel = $_POST['tafel'];
$aantal = $_POST['aantal'];
echo "De tafel van $tafel is:\n<BR><BR>";
for ($i=1;$i<=$aantal;$i++)
{$uitkomst=$i*$tafel;
echo "$i x $tafel = $uitkomst\n<BR>";
}
echo "<BR>Dit is een rij van $aantal regels.";
}
else {
if (isset($_POST["versturen"])) {
echo "<B>Je moet wel een tafel invullen en tot hoever die tafel moet
gaan!</B>\n<br>";
}
}
?>