Skip to content

Instantly share code, notes, and snippets.

@BacLuc
Created July 24, 2018 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BacLuc/bd8c671056d746c7c612a60d39372878 to your computer and use it in GitHub Desktop.
Save BacLuc/bd8c671056d746c7c612a60d39372878 to your computer and use it in GitHub Desktop.
<?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