October 6th, 2013, 05:27 PM
I have a website that allows users to search for fitness classes, gyms, etc by postcode.
I want to allow the user to input details of a fitness class and have it show on their profile page.
I'm just not exactly sure the best way to go about this.
The data I'm collecting is - the fitness class name, day of the week the class is on, start time, finish time, postcode to allow users to search for nearby classes, a description of the class and the "type" of fitness, i.e. Metafit, Insanity, etc.
Does anyone have any ideas on the best way to display the classes. I've thought about a timetable, but wouldn't be sure how to implement it in PHP, and it's possible for there to be more than one class in the same time slot, which my cause a problem.
Does anyone have any ideas?
October 7th, 2013, 12:01 AM
I'm not really sure I'm following what you're asking here ...
It sounds like you simply need to create a database, save the info to it, and if you're worried about two classes having the same timeslot, you can just run validation query on their input and check if that timeslot already exists on your database. (Which I'm not sure I understand exactly, because if there are multiple "training" locations, wouldn't each have the possibility of having a class at the same time?)
October 7th, 2013, 09:09 AM
Thanks for your reply.
Originally Posted by Jax2
Maybe I didn't explain too well in my original post.
Yes, there's the possibility of having two classes at the same time, which is fine, I just thought it might cause a problem when displaying it to a user.
I think I'm really just looking for advice as the best way to go about displaying the info from the database in a weekly timetable, or something similar.
October 7th, 2013, 01:38 PM
It was probably me not reading it right honestly
I have seen a few calendar scripts that could be of use in this for sure, but if you're just displaying data you can already correctly produce, perhaps just a nicely styled table for the week (using date-time to get the dates) would be sufficient.
For example, a weekly calendar showing how many classes are available on each day, and when clicked on, a daily schedule with each class type, or location showing up for each hour (which of course, you could display multiple classes for each hour) which again are clickable, and if clicked on, show a detail for that specific class.
This is quite similar to some of the scripts I mentioned, and some of those use ajax/jquery to change the views without needing to load a new page.
Not sure if that helped at all, but that is the way I would do it. Displaying multiple classes at the same time would be pretty simple with a count and a for loop.