简体   繁体   中英

PHP - Verify user token on every request

Here is a scenario: Whenever a user logs in, I send the user token along with the response and save it in localStorage. Now, I want to make another request and I also want to send the token back for confirmation as a valid token.

Here is a sample MySQL query:

SELECT * FROM news WHERE status = '1'

Currently, I am not checking the token. How will I do that?

Note: The token is in the user table.

I found the answer, its SQL EXIST OPERATOR , Can i get my upvotes now? Thanks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM