Help to set php session instead a static value

Hi i’m using thi script https://phppot.com/php/star-rating-with-php-and-jquery-ajax/
And i’ve a problem… i want set user session rating instead static member id. Now i can add only 1 rating. I would like to set more rating for different id session

I’ve try to add this on index.php:
session_start();
$member_id = session_id();

And on add rating.php this:
session_start();
$member_id = session_id();

Before it was:
$member_id = 1;

http://www.lecartedellamore.it/test/

Why are you using session_id()? If you want the member ID, use that, not the session ID.

Sponsor our Newsletter | Privacy Policy | Terms of Service