jimfog Posted October 3, 2011 Share Posted October 3, 2011 I am building an on line calendar application and since is the first timei am building such a project, i need some assistance. I assume it must be based on a table, with days corresponding in table cells(?) and all the php code will go there. Am i correct? Link to comment Share on other sites More sharing options...
Ingolme Posted October 3, 2011 Share Posted October 3, 2011 You don't need a database to make the calendar itself, you only need it to store events such as birthdays. Store the timestamps in an integer field. To display all the events of one month, just select timstamps between the unix timstamp of the beginning of the month and timestamp of the end of the month. Use mktime() to generate the timestamps.SELECT ... WHERE timestamp BETWEEN $time1 AND $time2 Link to comment Share on other sites More sharing options...
jimfog Posted October 3, 2011 Author Share Posted October 3, 2011 Ingolme, I am not interested yet about the stage where i will have to insert the data in the database. Now i am in the point, still, of the html markup. That is why i asked about what markup to choose, if the table element is the correct one for such an occasion. Link to comment Share on other sites More sharing options...
Synook Posted October 3, 2011 Share Posted October 3, 2011 You can use a table element, however it is not necessary to manually code every single day as a table data element - you can automatically generate that using PHP. Link to comment Share on other sites More sharing options...
jimfog Posted October 3, 2011 Author Share Posted October 3, 2011 I thought so too. Do you know where i can find a sample to code to study? Just to go faster, i am not very experienced to php. I am reading a book about php this period, but building a calendar is not contained in its sample projects. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.