Fighterlegend Posted November 8, 2009 Share Posted November 8, 2009 Alright, I've been tackling this for a while now.. And I've run out of ideas :/ I want to add a 'save rating' function to this: http://fighterlegend.com/effects/star/st.html But I just can't do it.. What I want to use the rating system for: My forums and blog. So users can rate other users forums. I came to you guys to help me! Quote Link to comment https://forums.phpfreaks.com/topic/180722-star-rating-system/ Share on other sites More sharing options...
mikesta707 Posted November 8, 2009 Share Posted November 8, 2009 you can send an AJAX request in the function that shows the text (IE the onClick function) that will send the value of the vote, and save it into a database Quote Link to comment https://forums.phpfreaks.com/topic/180722-star-rating-system/#findComment-953460 Share on other sites More sharing options...
Fighterlegend Posted November 8, 2009 Author Share Posted November 8, 2009 Hmm, I haven't gotten really used to PHP.. So I would send it via Ajax (or could I use Javascript to connect to a .php file that will then save it into a database) to a php file, which then writes to, I dunno, mySQL, or a .db file? Could I have a bit of help with this? I know, I sound like a noob at PHP, and that's because I am! I just done simple things in PHP (mostly following tutorials ) like displaying a blog post from a blog, writing to an XML file, redirecting if the url is different (I host my friends website also), and some small connection scripts. Quote Link to comment https://forums.phpfreaks.com/topic/180722-star-rating-system/#findComment-953637 Share on other sites More sharing options...
chauffeur Posted November 9, 2009 Share Posted November 9, 2009 you could modify this script to show stars based on number. ie 1 = star 10 = star star 20 = star star star go to here:- http://www.phpfreaks.com/forums/index.php/topic,276108.0.html Quote Link to comment https://forums.phpfreaks.com/topic/180722-star-rating-system/#findComment-953878 Share on other sites More sharing options...
mikesta707 Posted November 9, 2009 Share Posted November 9, 2009 well you send the score or rank via ajax, and store it into a database. something like $score = $_GET['score']; $query = mysql_query("INSERT INTO score (rank) VALUES ($score)"); But i don't know you table structure so I can't be of much more help Quote Link to comment https://forums.phpfreaks.com/topic/180722-star-rating-system/#findComment-953885 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.