You need to begin at the beginning with PHP. This is not a PHP forum.
Google is your friend.
Perhaps some of our PHP developers can point you at some good
beginner''s resources.
As far as the "then what", Jake has shown the basics of
the jQuery part of it above. You need to learn some PHP now!
PHP runs on the server.
Javascript runs in the browser.
N'er the twain shall meet, except through requests and responses.
PHP confuses new developers, because PHP lets you write HTML and
PHP in the same file. PHP removes the PHP parts and replaces them with
whatever content they produce before sending to the browser.
Go find a "hello, world" tutorial and begin at the beginning.
You will need to find a web hosting service (there are many) that
supports PHP. You can learn by installing a web server and PHP on your PC.
Or pick another language. PHP ain't all that. I can't
stand it, myself. It was badly-designed, it's ugly, it's had
several valiant rescue attempts and manages to be the most popular
server language. Go figure.
I like Ruby on Rails, Sinatra, or node.js for server programming.
If you just need to create a web service to store the data, and
don't need to create a website, either Sinatra or node.js would be
great matches. node.js let's you use Javascript on the server, so
you do not need to learn two languages, but fewer web hosts support it.