Question: I really need help before tomorrow or at least by tomorrow night. I have been working on this for days and still can't get it
I really need help before tomorrow or at least by tomorrow night. I have been working on this for days and still can't get it to run properly. I really need assistance. Here is the question that I need to answer:
Create a Web page that stores airline surveys in a MySQL database. Include fields for the date and time of the flight, flight number, and other fields you consider appropriate for identifying a particular flight. Also, include groups of radio buttons that allow the user to rate the airline on the following criteria:
Friendliness of customer staff
Space for luggage storage
Comfort of seating
Cleanliness of aircraft
Noise level of aircraft
Here is what I have so far:
Survey.html
Please enter the following details
Show Past Survey Results
submitsurvey.php
You must enter the date, flight number and departure time! Click your browser's Back button to return to the form."; else{ $DBConnect = @mysql_connect("localhost", "root", "AidanCT11"); if($DBConnect === FALSE) echo "
Unable to connect to the database server.
" . "
Error code ".mysql_errno() . ": ".mysql_error()."
"; else { $DBName = "airlineSurvey"; if(!@mysql_select_db($DBName, $DBConnect)){ $SQLstring = "CREATE DATABASE $DBName"; $QueryResult = @mysql_querry($SQLstring, $DBConnect); if($QueryResult === FALSE) echo "
Unable to execute the query.
" . "
Error code ".mysql_errno($DBConnect) . ": ".mysql_error($DBConnect) ."
"; else echo "
You are the first visitor!
"; } mysql_select_db($DBName, $DBConnect); $TableName = "airlineSurvey"; $SQLstring = "SHOW TABLES LIKE '$TableName'"; $QueryResult = @mysql_query($SQLstring, $DBConnect); if(mysql_num_rows($QueryResult) == 0){ $SQLstring = "CREATE TABLE $TableName (countID SMALLINT NOT NULL AUTO_INCREMENT PRIMARY KEY, last_name VARCHAR(40), first_name VARCHAR(40))"; $QueryResult = @mysql_query($SQLstring, $DBConnect); if($QueryResult === FALSE) echo "
Unable to create the table.
" . "
Error code ".mysql_errno($DBConnect) . ": ".mysql_error($DBConnect) ."
"; } $Date=stripslashes($_GET["date"]); $FlightNumber=($_GET["flight"]); $DepartureTime=($_GET["time"]); $Friendliness=($_GET["friendliness"]); $Cleanliness=($_GET["cleanliness"]); $Space=($_GET["space"]); $Noise=($_GET["noise"]); $Comfort=($_GET["comfort"]); $QueryResult = @mysql_query($SQLstring, $DBConnect); if($QueryResult === FALSE) echo "
Unable to execute the query.
" . "
Error code ".mysql_errno($DBConnect) . ": ".mysql_error($DBConnect) ."
"; else echo "
Thank you for completing our survey!
"; } mysql_close($DBConnect); } ?>
ShowPastResults.php
Unable to connect to the database server." . "
Error code ".mysql_errno() . ": ". mysql_error()."
"; else { $DBName = "airlineSurvey"; if (!@mysqli_select_db($DBConnect, $DBName)) die("
There are no past surveys!
"); }} $TableName = "t_survey"; $SQLstring = "SELECT * FROM $TableName"; $QueryResult = @mysqli_query($DBConnect, $SQLstring); if (mysql_num_rows($QueryResult) == 0) echo"
There are no passengers!
"; else{ echo "
The following passengers have completed the survey:
"; echo "
| Passenger Name | ||||
|---|---|---|---|---|
| {$Row['psngr_name']} |
| Friendliness of customer staff | Space for luggage storage | Comfort of seating | Cleanliness of aircraft | Noise level of aircraft |
|---|---|---|---|---|
| {$Row['no_op']} | "; echo "{$Row['poor']} | "; echo "{$Row['fair']} | "; echo "{$Row['good']} | "; echo "{$Row['exc']} |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts




