PDA

View Full Version : Could I make this dynamic?


karlosio
February 7th, 2007, 06:17 PM
Hi, I'm finding this difficult to implement so I'm hoping someone could guide me somehow or let me know if this could be possible...

I run an Internet radio website whereby DJs sign up using an application form on the site and when we get them set up and running we add their name to a schedule (timetable) page manually, having to go in and edit the HTML code whenever one signs up or even if one leaves.

The schedule page I currently have is here http://www.djpassion.co.uk/schedule.html

however I would possibly like to create this page with PHP so that when the new DJ signs up to play by filling in the fields in the apply form (time from - to and day of week), which gets added into a database table it would just be a matter of just going into an admin page and unticking a checkbox of a hidden field in the apply form called is_active which would be set at 0 as default (not active, playing) and when checked it would add their name into the schedule page in the html table with their name at the time they requested.

also some play over two hours so I would somehow need a way to display their name twice in 2 consecutive tds in the html table.

I hope I explained that right.

Would this involve a load of if... else statements? or could a loop be made to generate this, sorry im still quite new to php programming (teaching myself)

Buzz
February 7th, 2007, 06:22 PM
You explained it fine but what's the question? Just if it's possible? Yes. It would be a fairly simple thing to throw the form data into a database then allow for admin activation (provided you have a member system built as well). Once the data is in a database it's even easier to pull it out and display it based on a database field.


EDIT: You added the question :)

It may involve a few if else statements, conditional query to pull the active DJs, then a couple statements to position the time. You could use a switch since you are dealing with a set number of values, but basically with a table layout and needing to place something in both an x and y position, you'll need to build a large loop that contains the interior structure of the table, then use conditional inside the table cells to display the information.