5
1
Fork 0
mirror of https://github.com/Anvilcraft/jensmemes synced 2024-11-14 14:01:55 +01:00
jensmemes/website/uploadOK.php
2020-06-26 21:11:18 +02:00

22 lines
564 B
PHP

<?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;
echo "<b>unauthenticated.</b>";
}
?>