?
Solved

PHP/MySQL Event Manager script with dynamic form elements

Posted on 2007-10-18
2
Medium Priority
?
943 Views
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?
0
Comment
Question by:webstudiointeractive
2 Comments
 
LVL 20

Expert Comment

by:Gawai
ID: 20107431
Part 1 )
design diff diff tables for diff diff type of events.

0
 
LVL 1

Accepted Solution

by:
atf1084 earned 750 total points
ID: 20113431
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
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I’ll talk about multi-threaded slave statistics printed in MySQL error log file.
Recursive SQL is one of the most fascinating and powerful and yet dangerous feature offered in many modern databases today using a Common Table Expression (CTE) first introduced in the ANSI SQL 99 standard. The first implementations of CTE began ap…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses
Course of the Month14 days, 21 hours left to enroll

840 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