Page 1 of 1

Stars Not showing on Rating Script

Posted: 25 Jun 2017, 20:50
by jonbravo27
Good Day,

I've been working on this for hours and I'm sure there is something simple I'm missing, regarded to this script:
https://coursesweb.net/php-mysql/rating- ... jax-php_s2

I've downloaded all the directories to my root folder and reviewed the code to see if there is something I'm missing.
I could sure use some help on this. My test page is at:
fractioncalc.org/test.html

Thanks in advance....

Jon

Stars Not showing on Rating Script

Posted: 26 Jun 2017, 07:01
by JanMolendijk
Dear jonbravo27, i readed your topic
recently i had the same problem

Solution is standig on this page

problem-rating-script-t348.htm

Stars Not showing on Rating Script

Posted: 26 Jun 2017, 07:58
by Admin
Hello
In browser console (F12) appears that there is an error in "ratings.js" file, on line 1:

Code: Select all

SyntaxError: expected expression, got '<'
This error might be because of a wrong encoding of the text editor you used to edit the file.
Try use a text editor with "Encode in UTF-8 without BOM" , for example Notepad++.

Stars Not showing on Rating Script

Posted: 26 Jun 2017, 15:13
by Admin
Sorry,
I think that the problem is from php server.
I notied that your server emits warning error if the date_default_timezone_set isn't specified; which affects data returned to ajax.
So, in the "ratings.php" file add the following code (before including of the "class.rating.php"), and set the time zone you want to use.

Code: Select all

date_default_timezone_set('Europe/London');
- Or, download again the script, because I added it in this script.