如何从脚本到php文件获取id

时间:2018-03-07 16:19:47

标签: php jquery

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

0 个答案:

没有答案