PHP/MySQL Event Manager script with dynamic form elements

Posted on 2007-10-18
Last Modified: 2013-12-13
Part 1 )

I'm about to develop an "event manager" to allow an organisation to create various events and accept guest registrations and payments. I propose creating a table events and a table for registrations. However, the twist is that different events will require different fields. There will be some standard field e.g. name, email, phone, etc. but some events will require other fields such as medical history, or occupation that are non-standard.

What is the best way to design the database to handle a dynamic list of fields and track the responses for each field?

Part 2 )

Some events will require guests to select sessions in different time slots. For example, when running a conference there may be 10 different time slots in the conference and 5 sessions running in any one time slot. e.g. the time slot "Saturday Afternoon - 2pm to 3.30pm" may have the options "1. PHP Basics", "2. Database basics", "3. Integrating PHP & MySQL".

While working in with the solution to Step 1, what is the best way to allow guests to select sessions for different time slots?
Question by:webstudiointeractive
    LVL 20

    Expert Comment

    Part 1 )
    design diff diff tables for diff diff type of events.

    LVL 1

    Accepted Solution

    Part 1)

    create an events table with an auto increment id including name/address/descreiption etc..

    create a table for reservations, with an id, and the event id

    create a questions table with an auto increment id also include a field for the event id and a field name and type (checkbox/textfield/dropdown) and a default value field

    create another table for options which will reference the questions to get the different options for dropdowns, radios etc.

    create another one for answers, reference the reservations id, the even id and the questions id and an answer, to store how they answered each one either to include the actual value (for text boxes,check boxes) of the id in the options table for dropdowns and radios etc..

    Part 2)

    create a timeslots table, reference the event id, create a field for time and another for the type of lecture, in your sql you can then do like a group by the time where id -eventid to get all the lectures running at that time... or you can create yet another reference table for the luctures names and descriptions and reference the timeslots id

    Alter your reservations table to include a timeslot id and a lectures id

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
    These days socially coordinated efforts have turned into a critical requirement for enterprises.
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now