Aufgabe 9 fertig

This commit is contained in:
Robert
2023-11-10 01:04:07 +01:00
parent 217a13bd52
commit 59d1540de6
4 changed files with 64 additions and 2 deletions

View File

@@ -0,0 +1 @@
10

View File

@@ -6,6 +6,22 @@
*/
include "gerichte.php";
$besucherCount = 0;
if(file_exists("besucher.txt")){
$besucherFile = fopen("besucher.txt", "r");
$besucherCount = fgets($besucherFile) +1;
fclose($besucherFile);
$besucherFile = fopen("besucher.txt", "w");
fwrite($besucherFile, $besucherCount);
fclose($besucherFile);
}else{
$besucherFile = fopen("besucher.txt", "w");
fwrite($besucherFile, 1);
fclose($besucherFile);
}
?>
@@ -158,9 +174,9 @@ include "gerichte.php";
</table>
<h1 id="zahlen">E-Mensa in Zahlen</h1>
<div class="zahlen">
<p>X Besuche</p>
<p><?php echo $besucherCount;?> Besuche</p>
<p>Y Anmeldungen zum Newsletter</p>
<p>Z Speisen</p>
<p><?php echo count($gerichte);?> Speisen</p>
</div>
<h1 id="kontakt">Interesse geweckt? Wir informieren</h1>
<div class="formular">