Navigate a calendar. How?

Hi,

i have a pretty basic question.
I created a simple calendar in php which will be used to pick date to fill out a form.
I managed to write a function named createTable() which displays a given month in a calendar style. (Pretty simple but a nice little exercise for a beginner like me).
Now im stuck.
I want the user to be able to navigate the months.
Im pretty sure that i cant do that with PHP only, right?
So i would need a javascript function that calls my php function.
Is this the right approach?
Any hint is welcome.

thx in advance,
Benjamin

Yes, you are correct. PHP is executed at the server, the client is unaware there was any php code. For this you need javascript.

Whether it calls your php function (ajax) is dependant on what you are trying to do. eg a calendar by itself probably has no need of this; but a calendar that needs dates from your database does.

For reusability purposes and to make it more flexible it would be best to pull in data from a db.
That would mean taking the AJAX route.
Is this manageable for a beginner and does anybody have some links to a good tutorial on how to do this maybe.

thx,
Benjamin

It is not actually AJAX question. At least the first one.
Because no data pulled from DB. There should be Javascript calendar (thousands already from google) that simply insert choosen date to the date field using javascript.

What data you want to pull from the database?