Added the Analytics Page to the webpage

This commit is contained in:
lukejelse04 2021-03-22 08:44:26 +00:00
parent d15b16bc63
commit c9804abdc7
2 changed files with 34 additions and 3 deletions

View File

@ -0,0 +1,23 @@
<?php
$conn = new mysqli("localhost", "lukejelse04", "C3ssNa182", "snexo");
if($conn->connect_errno){
echo "<h6>Error: $conn->connect_error </h6>";
}else{
$currentAddress = $_SERVER['REMOTE_ADDR'];
$dateTime = date('d/m/Y H:i:s');
echo "<h6> $dateTime </h6>";
$sqlquery = "INSERT INTO VisitTime (IPAddress, DateTime) VALUES ('$currentAddress', '$dateTime')";
$result = $conn -> query($sqlquery);
}
?>

View File

@ -69,6 +69,9 @@
</div> </div>
<!-- Masthead Subheading--> <!-- Masthead Subheading-->
<p class="masthead-subheading font-weight-light mb-0">We Buy Your Unwanted Items</p> <p class="masthead-subheading font-weight-light mb-0">We Buy Your Unwanted Items</p>
</div> </div>
</header> </header>
@ -319,7 +322,12 @@
</footer> </footer>
<!-- Copyright Section--> <!-- Copyright Section-->
<div class="copyright py-4 text-center text-white"> <div class="copyright py-4 text-center text-white">
<div class="container"><small>Copyright © Snexo <?php echo date("Y"); ?></small></div> <div class="container"><small>Copyright © Snexo <?php echo date("Y"); ?><?php
include_once "assets/analytics/analytics.php";
?></small></div>
</div> </div>
<!-- Scroll to Top Button (Only visible on small and extra-small screen sizes)--> <!-- Scroll to Top Button (Only visible on small and extra-small screen sizes)-->
<div class="scroll-to-top d-lg-none position-fixed"> <div class="scroll-to-top d-lg-none position-fixed">