Need a Guide to writing a SIMPLE "PHP/MySQL up/down voting"
Posted: Fri Jul 31, 2009 5:08 am
Before everyone starts pointing me to the HUNDREDS of scripts out there, let me make my case 
I recently created a PHP/MySQL website database which shows something like a music chart list.
I'd like to enable visitors (none of this register crap, not interested in that yet) to vote up or down any number of tracks so that the chart is reorganised in order of popularity (so I'm happy for the page to reload).
But I can't find a SIMPLE guide to writing such a feature. They either include things like AJAX or others which (while include nice features) I'd rather leave FOR NOW or they don't contain one of the features below which I'm after.
1) IP Address checking (I'm aware of it's pitfalls, but I'd rather not the cookie method). I'm guessn' I'll need to create a second MySQL table, to-date I've only been dealing with ONE table.
2) Ability to vote UP or DOWN with the result shown as ONE NUMBER (do people suggest separate fields to store the UP & DOWNs and subtract one from the other when showing the result OR just keep them in the SAME database field.)
I found this one http://ad1987.blogspot.com/2009/02/redd ... l-and.html but it doesn't incorporate the IP Address checking.
I'm only 2weeks old in regards to website design & PHP coding, so this project is more of a learning experience then a need for all the bells & whistles.
Thanx guys
I recently created a PHP/MySQL website database which shows something like a music chart list.
I'd like to enable visitors (none of this register crap, not interested in that yet) to vote up or down any number of tracks so that the chart is reorganised in order of popularity (so I'm happy for the page to reload).
But I can't find a SIMPLE guide to writing such a feature. They either include things like AJAX or others which (while include nice features) I'd rather leave FOR NOW or they don't contain one of the features below which I'm after.
1) IP Address checking (I'm aware of it's pitfalls, but I'd rather not the cookie method). I'm guessn' I'll need to create a second MySQL table, to-date I've only been dealing with ONE table.
2) Ability to vote UP or DOWN with the result shown as ONE NUMBER (do people suggest separate fields to store the UP & DOWNs and subtract one from the other when showing the result OR just keep them in the SAME database field.)
I found this one http://ad1987.blogspot.com/2009/02/redd ... l-and.html but it doesn't incorporate the IP Address checking.
I'm only 2weeks old in regards to website design & PHP coding, so this project is more of a learning experience then a need for all the bells & whistles.
Thanx guys