jquery datepicker integration with php

jquery datepicker integration with php

Hi, Am a jquery newbie looking for someone to point me in the right direction. Basically I've created a simple event management script in php which enables a user to logon and post an event which is then inserted into a database.

On the frontend I've setup inline jquery datepicker which shows a calendar. What I want is to integrate the datepicker with my backend so that all events in a month are shaded in a different color. My problem is how to integrate my php script with the datepicker....I have a script which searches all events in a month and comes up with a date for each event, now how do I integrate the date from the php script into the datepicker? My basic idea is to add a class onto the element when the date value in datepicker is equal to the value in the php script....but how to do that? I just need pointers or sample code or similar code