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
|
|
|
?>
|