I am in the very beginnings of teaching myself php. I am giving myself micro projects to push myself.
Thus far I have a MYSQL database, created through a php form. One C
Personally I like Jonathan's answer.
However if you feel like you might need more info, I might be able to help.
As a small side project I tried to make a quote database like bash.org for my university.
It was developed using MySql and PHP, it has posting/voting much like what you are trying to accomplish.
It is by no means a well designed web app. However it might be able to get you going in the right direction.
Live testing site: link (be gentle!)
Code on GitHub: link
I would take a look at the database schema , the php-db-integration and the ajax to update a vote.
The code is fairly simple and straight foreword. One thing of note is the "filter_input"s, These functions are from a PHP library to sanitize user inputs to prevent SQL injections.