Answer the question
In order to leave comments, you need to log in
How to remove all bookmarks from the database?
Hello. This query displays all bookmarks of an authorized user:
$user_id = intval($_GET['user_id']);
$USER = $db->super_query("SELECT * FROM " . USERPREFIX . "_users WHERE user_id='{$user_id}' ");
echo $USER['favorites'];
Answer the question
In order to leave comments, you need to log in
Of course, you need to check whether the user is the owner of the bookmarks.
Something like:
$user_id = intval($_GET['user_id']);
if ((int)$member_id['user_id'] === $user_id ) {
$db->query( "UPDATE `" . USERPREFIX . "_users` SET `favorites`='' WHERE `user_id`='{$user_id}'" );
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question