Created
July 24, 2018 21:20
-
-
Save BacLuc/bd8c671056d746c7c612a60d39372878 to your computer and use it in GitHub Desktop.
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
<?php | |
/* | |
Skript um Samstage auszurechnen | |
*/ | |
echo "<html> | |
<body> | |
<form action='' method='post'> | |
<input type='date' name='anfangsdatum' value='".date("Y-m-d")."'> | |
<input type='submit' value='rechnen' name='submit'> | |
</form> | |
</body> | |
</html>"; | |
if(!empty($_POST['submit'])){ | |
echo "Anfangsdatum:".$_POST['anfangsdatum']; | |
$split=explode("-",$_POST['anfangsdatum']); | |
//var_dump($split); | |
echo "<table><br>"; | |
for($i=0;$i<100;$i++){ | |
$string=date("d.m.Y", mktime(0, 0, 0, $split[1], $split[2], $split[0])+($i*7*86400)); | |
echo "<tr><td>$string</td></tr>"; | |
} | |
echo "</table>"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment