Login works and Reservation works

This commit is contained in:
2022-09-20 22:30:10 +02:00
parent cf6e272d87
commit ce3465fdba
4 changed files with 263 additions and 53 deletions

View File

@@ -13,9 +13,9 @@ $ItemImage = $_POST['ItemImage'];
#--- check if the provided Image-Link is a real image:
$headers = get_headers($ItemImage, 1);
$headers = array_change_key_case(get_headers($ItemImage, 1), CASE_LOWER); // make all keys LowerCase
if (strpos($headers['Content-Type'], 'image/') !== false) {
if (strpos($headers['content-type'], 'image/') !== false) {
$strippedimagepath = strtok($ItemImage, '?');
$imageLocalLink = 'data/images/' . uniqid() . '.' . pathinfo($strippedimagepath, PATHINFO_EXTENSION);
echo "ImageLink: " . $imageLocalLink;