PHP file:
<?php
require_once('dbconfig.php');
$query = "SELECT * FROM booking_table ";
$events = mysqli_query($link, $query);
?>
script file:
function authentication1()
{
var token = localStorage.getItem("token");
var id = localStorage.getItem("id");
if(token==null)
{
alert('Please Login To Continue');
window.location="/";
}
else
{
$.post("logoutchk.php",
{
token: token
},
function(data, status)
{
$("#checklogout").html(data);
});
}
}
如何获取从localstorage从脚本到php文件的id ................................ .................................................. .........