For this project we were tasked with designing a survey in PHP that can add, edit and query an SQL database. Since I am a huge supporter of Team ASPCA I decided to create a survey for race participants in a fictional race. What follows is part of the write up for the project or you can just jump right into the survey to check it out for yourself.
The TEAM ASPCA Half Marathon is a race event held on the last week of every October. Over 5,000 people participate in the three races; a 5K, 10K and half marathon. Each race has as a different course but finish and start at the same place. The first two events have been marred by reviews from Half Marathon runners complaining about the lack of support in the final stretch as runners from the shorter distances have used up the water and food. The event, in its third iteration, has become a marquee event for the ASPCA and management would like to improve the race to attract a larger crowd. A survey sent out shortly after the race can provide insight as to what the racers liked and disliked about the event.
First, the participant is presented with a brief survey covering unidentifiable personal information, such as location and race experience. The next page is the race survey that covers four vital aspects of the race: the pre-race, course, post-race, and the event overall. Each section is clearly marked and contains a textbox for users to add comments, questions or concerns. Every question but the comments boxes are required. After the race survey section the user is presented with a summary of their entries and a button to submit their responses. Finally, the user is thanked for their feedback and provided with a coupon for registering to next year’s event.
- What is your age?
- What running team are you a part of?
- Where are you located? (Asks for City and State)
- How many races have you participated in?
- Is this your first time running one of our events?
- Did you fundraise?
- Which race did you participate in?
- Was there enough prerace communication?
- How did you keep up date about the race?
- Did you attend the race kickoff party?
- Which expo did you attend?
- How would you rate the expo?
- How would you rate the starting line area?
- OPTIONAL: Any comments about prerace events?
- How would you rate the course support?
- Who was your favorite cheer squad?
- Overall, how would you rate the course?
- OPTIONAL: Any comments about the course?
- Did you attend the post-race festival?
- Was there enough post-race support?
- How would you rate the post-race area?
- OPTIONAL: Any comments about the post-race area?
- Overall, how would you rate the event?
- OPTIONAL: Any comments about the event?
The participant section of the survey allows the race managers to capture some vital information from their users that allow them to establish user groups in reports, while still maintaining user privacy to allow for candid feedback. Each question in the race section covers different aspects from throughout the event experience. Knowing which communication channels worked can allow strategic marketing of future events. With past problems of spotty post-race support, the survey also allows managers to track if the issue is ongoing. Lastly, providing a comment box for each section allows users to focus their comments on particular aspects of the race.
The database contains five entities, housed in a separate table: the event, expo, participant, race and the opinion. Every field but the comment fields are required.
- The Event table contains information of the iteration of the event. That is to say, the First Annual event has an ID of 1, the Second Annual has an ID of 2, and the Third Annual (this year) is 3. Every year a new row will be created to contain the information of the event.
- The Expo table contains information of the expo of the event. There are three locations possible for the expo: Friday pick up at Run With Us, Saturday pick up at the Pasadena Convention Center and Sunday pick up at the race start. There are only three packet ups allowed for the event.
- The Participant table holds the personal information provided by the survey respondent
- The Race table contains information on the three races held during the event. There is the 5K Presented by Run with Us, Race for the Rescues 10K, and the Team ASPCA Half Marathon.
- Finally, the Opinion table holds the race feedback provided by the survey participant. All of the entities are tied together through this entity.
The welcome page explains the purpose of the survey to the participant and collects their personal information. A “On to Race Survey” button links through to the next page, project.php. This page stores the information from the previous page and collects information on the race, which is stored in the opinion table. The user hits the “Review Feedback” button that links to project2.php where they are presented with the information provided in the previous two pages. The user then hits “SUBMIT Feedback” to lead to project3.php that processes all of the information gathered in the survey and inserts it into our SQL database, once the transmission is complete the user is thanked for their time, presented with a coupon and linked back to the survey home page.