I have a php script that creates a calender with the current month year. I want to add 2 buttons. One is to go back 1 month and 1 is to go forward one month
I have encapsulated the calender as cal();
When the function is called again it will add or subtract one from the month property. the problem is getting the function to reload when the user clicks the previous or the next button.
I am trying to give the buttons onclick attributes
<input type="submit" value="prev" onclick="cal()";>
This code doesn't work obviously. I rather not have to add javascript or ajax. there should be a way to do this in php!
thanks for your time,
imsoconfused,
sincerely