This file contains 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
let receipts = document.getElementsByTagName('li'); | |
let total = 0.0; | |
// test of de tags gevonden zijn | |
console.log(receipts); | |
for (let i = 0; i < receipts.length; i++) { | |
let totalString = receipts[i].innerHTML; | |
total += parseFloat(totalString); |
This file contains 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 | |
$timestamp = strtotime($datum); // Creating timestamp from given date | |
$new_date = date("d-m-Y", $timestamp); // Creating new date format from that timestamp | |
?> |
This file contains 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 | |
function escapeInput($value) { | |
global $conn; | |
return mysqli_real_escape_string($conn, trim($value)); | |
} | |
?> |
This file contains 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 | |
session_start(); //sessie startren | |
session_destroy(); //sessie verwijderen | |
// header ('location: login.php'); //redirect naar login | |
exit; //sluiten | |
?> |
This file contains 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 | |
if (isset($_POST['submit'])) { //controleren of formulier verzonden is | |
$email = $_POST['email']; //indien verzonden variabelen vullen | |
$password = $_POST['password']; | |
$sql = "SELECT * FROM `registratie` WHERE `email` = '$email'"; //query in variabel stoppen | |
$result = $conn->query($sql); | |
if (empty($email)) { //error handling | |
$_SESSION["error"] = "Vul een e-mailadres in"; //variabel error vulen waar ajax gebruik van maakt |