Dude, you need to read the instruction properly.
First run the test.html page on your localhost. Then once you got it working, do the mysql version.
Let say you will be running or testing the script on your localhost/rating,
- unzipped the downloaded zip file.
- inside the unzipped file, locate 5_stars_rating_script.zip
- Unzipped 5_stars_rating_script.zip
On your localhost root directory create a directory called rating
open the rating directory and move these directories (ratingfiles,ratingtxt,and test.html), from the unzipped 5_stars_rating_script directory.
load the rating/ratingfiles/rating.js on your text editor
find line 41 and look for this code
star_sp.style.background = 'url("ratingfiles/star2.png")';
change it to
star_sp.style.background = 'url("http://localhost/ratingfiles/star2.png")';
now, scroll down the page around line 105 and look for this code
cerere_http.open("POST", '/ratingfiles/ratings.php', true);
change it to this
cerere_http.open("POST", 'http://localhost/rating/ratingfiles/ratings.php', true);
Lastly, load the test.html file on the editor and find this line
- Here can be an image, img1.jpg
replace the string above with your test image
<img id="yourImage" src="yourImage.jpg" />
save all of your changes and direct your browser to localhost/rating/test.html
You should be viewing something like the screenshot below