Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("global.php");
- error_reporting(E_ALL);
- ini_set("display_errors", "on");
- ini_set("display_startip_errors", "on");
- include_once "header/header.php";
- $connect = new mysqli('geheim');
- date_default_timezone_set("Europe/Berlin");
- $null = "1";
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- </head>
- <body>
- <?php
- $timestamp = time();
- $datum = date("Y-m-d", $timestamp);
- $anzahl = 0;
- $abfrage = $connect->query("SELECT * FROM Besucher");
- $abfrage2 = $abfrage->fetch_assoc();
- $anzahl = $abfrage2["Anzahl"];
- $anzahl++;
- $insert = $connect->prepare("INSERT INTO Besucher (Anzahl, Datum) VALUES($null, $datum) ON DUPLICATE KEY UPDATE Anzahl = $anzahl, Datum = $datum");
- $insert->execute();
- echo $datum;
- echo "Besucheranzahl:" .$anzahl;
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement