5
1
Fork 0
mirror of https://github.com/Anvilcraft/jensmemes synced 2024-11-13 21:41:27 +01:00
jensmemes/website/uploadOK.php

23 lines
564 B
PHP
Raw Normal View History

2020-06-25 20:47:16 +02:00
<?php
include('dbcon.php');
$tokencookie = $_COOKIE['token'];
$resulttoken=mysqli_query($con, "select * from token WHERE token='$tokencookie'")or die('Error In Session');
$rowtoken=mysqli_fetch_array($resulttoken);
$tokenpost = $_POST['token'];
$resultpost=mysqli_query($con, "select * from token WHERE token='$tokenpost'")or die('Error In Session');
$rowpost=mysqli_fetch_array($resultpost);
if(!empty($rowtoken) || !empty($rowpost)){
$uploadOK = true;
//echo "<b>Authenticated.</b>";
}else{
$uploadOK = false;
2020-06-26 21:11:18 +02:00
echo "<b>unauthenticated.</b>";
2020-06-25 20:47:16 +02:00
}
2020-06-26 21:11:18 +02:00
2020-06-25 20:47:16 +02:00
?>