Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function favorite(id) {
- jQuery.ajax({
- url: "favorite.php",
- method: "POST",
- data: { id: id }
- });
- }
- <button onclick="favorite('<?= $id ?>'); return false;">В избранное</button>
- <button onclick="favorite('<?= $id ?>'); return false;">Удалить с избранного</button>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement