Created
March 12, 2020 08:55
-
-
Save phpfiddle/461ad03d396fb07575f07f3d4f242746 to your computer and use it in GitHub Desktop.
[ Posted by Zeusbeer ] H7 opdracht 8 fruitlijst sorteren (niet compleet)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
label { | |
float:left; | |
display:block; | |
width:250px; | |
} | |
input{ | |
display:block; | |
} | |
</style> | |
<html> | |
<form method="post" actions =""> | |
<label>fruit</label> | |
<input type = "text" name = "fruit"> | |
<br> | |
<label>voeg fruit toe</label> | |
<input type = "submit" name = "verzenden"> | |
</form> | |
</html> | |
<?php | |
$array = array(); | |
$fruit = 0; | |
if(isset($_POST['verzenden'])) | |
{ | |
$fruit = $_POST['fruit']; | |
echo "HAY <br>"; | |
} | |
array_push($array, $fruit); | |
for($i = 0; $i <= count($array); $i++) | |
{ | |
echo $array[$i]; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment