JustinM01 Posted April 11, 2007 Share Posted April 11, 2007 OK, I'm trying to make own homebrew blog. I have exactly one day of experience with AJAX, that day being yesterday. Anyways, I was able to get a simple AJAX commenting system going, but I have a problem with another portion of my site. Basically, I'm trying to make a content box that lists each month there were posts for a particular year. Like this: ------------------------ | Post by Month for 2007 | | <<< >>> | ------------------------ | January (1) | | February (2) | | April (4) | ------------------------- I started by making a calendar class in PHP. It initializes to the current date and outputs the months with posts for the current year, 2007. Those arrows near the top of the box are supposed to decrease and increase the year, respectively. The problem is, my AJAX script routes to a PHP script sending a variable containing the requested year change, but when I initiate a new object from the calendar object and send the data back, it doesn't work. Now, this is because the objects in each page are different, so what happens is you can go to 2006 and 2008, but no farther than that. It also doesn't let you go back to 2007. I thought about serializing the class and sending it through AJAX to my php script handler, but either you can't do it that way, or I can't figure out how to get it work. I thought about have a very simple MySQL table to store the variable, but that doesn't work, obviously, because every user on the site would be modifying the same variable. Is there some other way to do this that I haven't thought of? I'm not looking for code so much as I'm looking for an explanation of how to do it, I should be able to figure out the code on my own. Thanks for your time. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.