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

22 lines
567 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>";
}
?>