Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function(event) {
- $('body').on('click', '.firstadd', function(event) {
- var link = $(this);
- var first = $(this).attr('data-first');
- successfunc();
- $.ajax({
- url: 'first.php',
- method: 'POST',
- data: {"first" : first}
- })
- });
- });
- //php
- session_start();
- $first = $_POST['first'];
- if (empty($_SESSION['rating'])) {
- $_SESSION['rating'] = [];
- };
- if (!in_array($first, $_SESSION['rating'])) {
- $_SESSION['rating'][] = $first;
- $success = 1;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement