Jump to content

Sfrius

New Members
  • Posts

    6
  • Joined

  • Last visited

Sfrius's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. $SQLstringg = "SELECT * FROM `opportunities`"; This works for now. I had to use the special characters for '. For some reason the language in my db is set to latin1/swedi. Why doesn't the mysql database except the basic format for mysql commands?
  2. Hello, I cannot figure out why the following code is giving me problems. Here it works. $AssignedOpportunities = array(); $SQLstring = "SELECT opportunityID FROM $TableName " . " WHERE date_approved IS NOT NULL"; $QueryResult = @mysql_query($SQLstring, $DBConnect); if (mysql_num_rows($QueryResult) > 0) { while (($Row = mysql_fetch_row($QueryResult)) !== FALSE) $AssignedOpportunities[] = $Row[0]; mysql_free_result($QueryResult); } Here it doesn't work $TableName = "opportunities"; $Opportunities = array(); $SQLstring = "SELECT opportunityID, company, city, " . " start_date, end_date, position, description " . " FROM $TableName"; $QueryResult = @mysql_query($SQLstring, $DBConnect); if (mysql_num_rows($QueryResult) > 0) { //LINE CONTAINING THE ERROR while (($Row = mysql_fetch_assoc($QueryResult)) !== FALSE) $Opportunities[] = $Row; mysql_free_result($QueryResult); }
  3. Thanks sitd. I was so close, I knew it had something to do with my insert statement. I completely overlooked the fact that you can't have " inside of a string without an escape character. The sql error was just saying that there was more data in the line than I was allowing to be displayed. I easily fixed this by adding row[5], 6, 7, and 8. It took me 2 minutes to fix everything.
  4. Ok here it is 99% complete. I made it one file, but when I post back and use the same file to process it, it says that isset is false when it should be true? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <meta http-equiv="content-type" content="text/html"; charset=iso-8859-1" /> </head> <body> <?php $dbName = "airline"; $DBConnect = mysql_connect("127.0.0.1", "root", "yourpassword"); $createTable = "CREATE TABLE `surveys` ( `f_date` VARCHAR( 30 ) NOT NULL , `f_time` VARCHAR( 30 ) NOT NULL , `f_number` VARCHAR( 30 ) NOT NULL , `f_destination` VARCHAR( 30 ) NOT NULL , `f_friend` VARCHAR( 30 ) NOT NULL , `f_space` VARCHAR( 30 ) NOT NULL , `f_comfort` VARCHAR( 30 ) NOT NULL , `f_clean` VARCHAR( 30 ) NOT NULL , `f_noise` VARCHAR( 50 ) NOT NULL );"; if(isset($_POST['Send'])){ $tmpVar1 = $_POST['f_time']; $tmpVar2 = $_POST['f_date']; $tmpVar3 = $_POST['f_number']; $tmpVar4 = $_POST['f_destination']; $tmpVar5 = $_POST['f_friend']; $tmpVar6 = $_POST['f_space']; $tmpVar7 = $_POST['f_comfort']; $tmpVar8 = $_POST['f_clean']; $tmpVar9 = $_POST['f_noise']; $insert = "INSERT INTO `airline`.`surveys` ( `f_date` , `f_time` , `f_number` , `f_destination` , `f_friend` , `f_space` , `f_comfort` , `f_clean` , `f_noise` ) VALUES ($tmpVar1, $tmpVar2, $tmpVar3, $tmpVar4, $tmpVar5, $tmpVar6, $tmpVar7, $tmpVar8, $tmpVar9);"; $QueryResult = mysql_query($insert, $DBConnect); if($QueryResult === FALSE){ echo "<p>Could not insert the data from $_POST</p>"; }else{ $SQLSelect = "SELECT * FROM surveys"; $QueryResult = mysql_query($SQLSelect, $DBConnect); if($QueryResult === FALSE){ echo "<p>There was an error selecting the data from the table</p>"; }else{ echo "<p>Selected data into a table</p>"; echo "<table width='100' border='1'>\n"; echo "<tr><th>Flight Date</th><th>Flight Time</th><th>Flight Number</th><th>Destination</th><th>Friendliness</th><th>Storage Space</th><th>Comfort</th><th>Cleanliness</th><th>Noise</th></tr>\n"; while (($Row = mysql_fetch_row($QueryResult)) !== FALSE) { //was a note to myself. //count $row array //for loop to iterate rows echo "<tr><td>{$Row[0]}</td>"; echo "<td>{$Row[1]}</td>"; echo "<td>{$Row[2]}</td>"; echo "<td align='right'>{$Row[3]}</td>"; echo "<td>{$Row[4]}</td></tr>"; } echo "</table>"; echo "<h2>Survey ISSET IS TRUE</h2>"; echo "<FORM action=\"airline.php\" method=\"post\">"; echo "<P>"; echo "Flight Time: <INPUT type=\"text\" name=\"f_time\"><BR>"; echo "Flight Date: <INPUT type=\"text\" name=\"f_date\"><BR>"; echo "Flight Number: <INPUT type=\"text\" name=\"f_number\"><BR>"; echo "Destination: <INPUT type=\"text\" name=\"f_destination\"><BR>"; echo "<p>How would you rate the friendliness of the staff?</p>"; echo "<INPUT type=\"radio\" name=\"f_friend\" value=\"No Opinion\"> No Opinion<BR>"; echo "<INPUT type=\"radio\" name=\"f_friend\" value=\"Poor\"> Poor<BR>"; echo "<INPUT type=\"radio\" name=\"f_friend\" value=\"Fair\"> Fair<BR>"; echo "<INPUT type=\"radio\" name=\"f_friend\" value=\"Good\"> Good<BR>"; echo "<INPUT type=\"radio\" name=\"f_friend\" value=\"Excellent\"> Excellent<BR>"; echo "<p>How would you rate the storage space on the plane?</p>"; echo "<INPUT type=\"radio\" name=\"f_space\" value=\"No Opinion\"> No Opinion<BR>"; echo "<INPUT type=\"radio\" name=\"f_space\" value=\"Poor\"> Poor<BR>"; echo "<INPUT type=\"radio\" name=\"f_space\" value=\"Fair\"> Fair<BR>"; echo "<INPUT type=\"radio\" name=\"f_space\" value=\"Good\"> Good<BR>"; echo "<INPUT type=\"radio\" name=\"f_space\" value=\"Excellent\"> Excellent<BR>"; echo "<p>How would you rate the comfort on the plane?</p>"; echo "<INPUT type=\"radio\" name=\"f_comfort\" value=\"No Opinion\"> No Opinion<BR>"; echo "<INPUT type=\"radio\" name=\"f_comfort\" value=\"Poor\"> Poor<BR>"; echo "<INPUT type=\"radio\" name=\"f_comfort\" value=\"Fair\"> Fair<BR>"; echo "<INPUT type=\"radio\" name=\"f_comfort\" value=\"Good\"> Good<BR>"; echo "<INPUT type=\"radio\" name=\"f_comfort\" value=\"Excellent\"> Excellent<BR>"; echo "<p>How would you rate the cleanliness of the plane?</p>"; echo "<INPUT type=\"radio\" name=\"f_clean\" value=\"No Opinion\"> No Opinion<BR>"; echo "<INPUT type=\"radio\" name=\"f_clean\" value=\"Poor\"> Poor<BR>"; echo "<INPUT type=\"radio\" name=\"f_clean\" value=\"Fair\"> Fair<BR>"; echo "<INPUT type=\"radio\" name=\"f_clean\" value=\"Good\"> Good<BR>"; echo "<INPUT type=\"radio\" name=\"f_clean\" value=\"Excellent\"> Excellent<BR>"; echo "<p>How would you rate the noise level on the plane?</p>"; echo "<INPUT type=\"radio\" name=\"f_noise\" value=\"No Opinion\"> No Opinion<BR>"; echo "<INPUT type=\"radio\" name=\"f_noise\" value=\"Poor\"> Poor<BR>"; echo "<INPUT type=\"radio\" name=\"f_noise\" value=\"Fair\"> Fair<BR>"; echo "<INPUT type=\"radio\" name=\"f_noise\" value=\"Good\"> Good<BR>"; echo "<INPUT type=\"radio\" name=\"f_noise\" value=\"Excellent\"> Excellent<BR>"; echo "<INPUT type=\"submit\" value=\"Send\"> <INPUT type=\"reset\">"; echo "</P>"; echo "</FORM>"; } } //end of ISSET and beginning of db creation and form display }else{ if($DBConnect == FALSE){ echo "<p>Connection Error: " . mysql_error() . "</p>\n"; }else { echo "<p>Connection Successful.</p>"; $dropDB = "DROP DATABASE $dbName"; $noDB = mysql_query($dropDB); $newDB = "CREATE DATABASE $dbName"; $newResults = mysql_query($newDB); if($newResults == FALSE){ echo "<p>Could not create the database. You don't have the required permissions or the database already exists." . mysql_error($DBConnect) . "</p>"; } else{ echo "<p>The database was created successfully.</p>"; if (mysql_select_db ("$dbName",$DBConnect) === FALSE){ echo "<p>Could not select the database ", $dbName, ".", mysql_error($DBConnect), "</p>"; } else{ echo "<p>The ", $dbName, " database has been selected."; $QueryResult = mysql_query($createTable, $DBConnect); if($QueryResult === FALSE) echo "<p>There was an error or the table already exists in the database</p>"; else{ echo "<p>The table was created now to insert some data</p>"; echo "<table width='100' border='1'>\n"; echo "<tr><th>Flight Date</th><th>Flight Time</th><th>Flight Number</th><th>Destination</th><th>Friendliness</th><th>Storage Space</th><th>Comfort</th><th>Cleanliness</th><th>Noise</th></tr>\n"; $SQLSelect = "SELECT * FROM surveys"; $QueryResult = mysql_query($SQLSelect, $DBConnect); while (($Row = mysql_fetch_row($QueryResult)) !== FALSE) { // //count $row array //for loop to iterate rows echo "<tr><td>{$Row[0]}</td>"; echo "<td>{$Row[1]}</td>"; echo "<td>{$Row[2]}</td>"; echo "<td align='right'>{$Row[3]}</td>"; echo "<td>{$Row[4]}</td></tr>"; } echo "</table>"; echo "<h2>Survey ISSET IS FALSE</h2>"; echo "<FORM action=\"airline.php\" method=\"post\">"; echo "<P>"; echo "Flight Time: <INPUT type=\"text\" name=\"f_time\"><BR>"; echo "Flight Date: <INPUT type=\"text\" name=\"f_date\"><BR>"; echo "Flight Number: <INPUT type=\"text\" name=\"f_number\"><BR>"; echo "Destination: <INPUT type=\"text\" name=\"f_destination\"><BR>"; echo "<p>How would you rate the friendliness of the staff?</p>"; echo "<INPUT type=\"radio\" name=\"f_friend\" value=\"No Opinion\"> No Opinion<BR>"; echo "<INPUT type=\"radio\" name=\"f_friend\" value=\"Poor\"> Poor<BR>"; echo "<INPUT type=\"radio\" name=\"f_friend\" value=\"Fair\"> Fair<BR>"; echo "<INPUT type=\"radio\" name=\"f_friend\" value=\"Good\"> Good<BR>"; echo "<INPUT type=\"radio\" name=\"f_friend\" value=\"Excellent\"> Excellent<BR>"; echo "<p>How would you rate the storage space on the plane?</p>"; echo "<INPUT type=\"radio\" name=\"f_space\" value=\"No Opinion\"> No Opinion<BR>"; echo "<INPUT type=\"radio\" name=\"f_space\" value=\"Poor\"> Poor<BR>"; echo "<INPUT type=\"radio\" name=\"f_space\" value=\"Fair\"> Fair<BR>"; echo "<INPUT type=\"radio\" name=\"f_space\" value=\"Good\"> Good<BR>"; echo "<INPUT type=\"radio\" name=\"f_space\" value=\"Excellent\"> Excellent<BR>"; echo "<p>How would you rate the comfort on the plane?</p>"; echo "<INPUT type=\"radio\" name=\"f_comfort\" value=\"No Opinion\"> No Opinion<BR>"; echo "<INPUT type=\"radio\" name=\"f_comfort\" value=\"Poor\"> Poor<BR>"; echo "<INPUT type=\"radio\" name=\"f_comfort\" value=\"Fair\"> Fair<BR>"; echo "<INPUT type=\"radio\" name=\"f_comfort\" value=\"Good\"> Good<BR>"; echo "<INPUT type=\"radio\" name=\"f_comfort\" value=\"Excellent\"> Excellent<BR>"; echo "<p>How would you rate the cleanliness of the plane?</p>"; echo "<INPUT type=\"radio\" name=\"f_clean\" value=\"No Opinion\"> No Opinion<BR>"; echo "<INPUT type=\"radio\" name=\"f_clean\" value=\"Poor\"> Poor<BR>"; echo "<INPUT type=\"radio\" name=\"f_clean\" value=\"Fair\"> Fair<BR>"; echo "<INPUT type=\"radio\" name=\"f_clean\" value=\"Good\"> Good<BR>"; echo "<INPUT type=\"radio\" name=\"f_clean\" value=\"Excellent\"> Excellent<BR>"; echo "<p>How would you rate the noise level on the plane?</p>"; echo "<INPUT type=\"radio\" name=\"f_noise\" value=\"No Opinion\"> No Opinion<BR>"; echo "<INPUT type=\"radio\" name=\"f_noise\" value=\"Poor\"> Poor<BR>"; echo "<INPUT type=\"radio\" name=\"f_noise\" value=\"Fair\"> Fair<BR>"; echo "<INPUT type=\"radio\" name=\"f_noise\" value=\"Good\"> Good<BR>"; echo "<INPUT type=\"radio\" name=\"f_noise\" value=\"Excellent\"> Excellent<BR>"; echo "<INPUT type=\"submit\" value=\"Send\"> <INPUT type=\"reset\">"; echo "</P>"; echo "</FORM>"; }}}}} //mysql_close($DBConnet); ?> </body> </html>
  5. No just a blank screen. No errors, let me repost the script for you, I have a good idea. Gonna do it now, should take an hour or so. I was trying different things so the code is out of whack. Gonna start from step 1 and work my way down with isset as the first if clause.
  6. Hey, I'm trying to build a simple form with post back that is using a mysql database. I wanted to do a sticky post but the main file includes db creation commands. So I setup a process file to show the table I created and show the form below it so that I can keep adding additional records to the table. I'm currently running php v5.2.6. Posting code: Notice how I made an insert string with $tmpvariables, does this work? I would think that it should. My main problem came about when I tried to store the $_POST variables in temporary variables and then use an insert string as it is shown in the following code. Any help is welcome and any additional comments are appreciated. Thank you. <?php $dbName = "airline"; $DBConnect = mysql_connect("127.0.0.1", "******", "*********************"); $createTable = "CREATE TABLE `surveys` ( `f_date` VARCHAR( 30 ) NOT NULL , `f_time` VARCHAR( 30 ) NOT NULL , `f_number` VARCHAR( 30 ) NOT NULL , `f_destination` VARCHAR( 30 ) NOT NULL , `f_friend` VARCHAR( 30 ) NOT NULL , `f_space` VARCHAR( 30 ) NOT NULL , `f_comfort` VARCHAR( 30 ) NOT NULL , `f_clean` VARCHAR( 30 ) NOT NULL , `f_noise` VARCHAR( 50 ) NOT NULL );"; if($DBConnect == FALSE){ echo "<p>Connection Error: " . mysql_error() . "</p>\n"; }else { echo "<p>Connection Successful.</p>"; $dropDB = "DROP DATABASE $dbName"; $noDB = mysql_query($dropDB); $newDB = "CREATE DATABASE $dbName"; $newResults = mysql_query($newDB); if($newResults == FALSE){ echo "<p>Could not create the database. You don't have the required permissions or the database already exists." . mysql_error($DBConnect) . "</p>"; } else{ echo "<p>The database was created successfully.</p>"; if (mysql_select_db ("$dbName",$DBConnect) === FALSE){ echo "<p>Could not select the database ", $dbName, ".", mysql_error($DBConnect), "</p>"; } else{ echo "<p>The ", $dbName, " database has been selected."; $QueryResult = mysql_query($createTable, $DBConnect); if($QueryResult === FALSE) echo "<p>There was an error or the table already exists in the database</p>"; else{ echo "<p>The table was created now to insert some data</p>"; echo "<h2>Survey</h2>"; echo "<FORM action=\"Surveyprocess.php\" method=\"post\">"; echo "<P>"; echo "Flight Time: <INPUT type=\"text\" name=\"f_time\"><BR>"; echo "Flight Date: <INPUT type=\"text\" name=\"f_date\"><BR>"; echo "Flight Number: <INPUT type=\"text\" name=\"f_number\"><BR>"; echo "Destination: <INPUT type=\"text\" name=\"f_destination\"><BR>"; echo "<p>How would you rate the friendliness of the staff?</p>"; echo "<INPUT type=\"radio\" name=\"f_friend\" value=\"No Opinion\"> No Opinion<BR>"; echo "<INPUT type=\"radio\" name=\"f_friend\" value=\"Poor\"> Poor<BR>"; echo "<INPUT type=\"radio\" name=\"f_friend\" value=\"Fair\"> Fair<BR>"; echo "<INPUT type=\"radio\" name=\"f_friend\" value=\"Good\"> Good<BR>"; echo "<INPUT type=\"radio\" name=\"f_friend\" value=\"Excellent\"> Excellent<BR>"; echo "<p>How would you rate the storage space on the plane?</p>"; echo "<INPUT type=\"radio\" name=\"f_space\" value=\"No Opinion\"> No Opinion<BR>"; echo "<INPUT type=\"radio\" name=\"f_space\" value=\"Poor\"> Poor<BR>"; echo "<INPUT type=\"radio\" name=\"f_space\" value=\"Fair\"> Fair<BR>"; echo "<INPUT type=\"radio\" name=\"f_space\" value=\"Good\"> Good<BR>"; echo "<INPUT type=\"radio\" name=\"f_space\" value=\"Excellent\"> Excellent<BR>"; echo "<p>How would you rate the comfort on the plane?</p>"; echo "<INPUT type=\"radio\" name=\"f_comfort\" value=\"No Opinion\"> No Opinion<BR>"; echo "<INPUT type=\"radio\" name=\"f_comfort\" value=\"Poor\"> Poor<BR>"; echo "<INPUT type=\"radio\" name=\"f_comfort\" value=\"Fair\"> Fair<BR>"; echo "<INPUT type=\"radio\" name=\"f_comfort\" value=\"Good\"> Good<BR>"; echo "<INPUT type=\"radio\" name=\"f_comfort\" value=\"Excellent\"> Excellent<BR>"; echo "<p>How would you rate the cleanliness of the plane?</p>"; echo "<INPUT type=\"radio\" name=\"f_clean\" value=\"No Opinion\"> No Opinion<BR>"; echo "<INPUT type=\"radio\" name=\"f_clean\" value=\"Poor\"> Poor<BR>"; echo "<INPUT type=\"radio\" name=\"f_clean\" value=\"Fair\"> Fair<BR>"; echo "<INPUT type=\"radio\" name=\"f_clean\" value=\"Good\"> Good<BR>"; echo "<INPUT type=\"radio\" name=\"f_clean\" value=\"Excellent\"> Excellent<BR>"; echo "<p>How would you rate the noise level on the plane?</p>"; echo "<INPUT type=\"radio\" name=\"f_noise\" value=\"No Opinion\"> No Opinion<BR>"; echo "<INPUT type=\"radio\" name=\"f_noise\" value=\"Poor\"> Poor<BR>"; echo "<INPUT type=\"radio\" name=\"f_noise\" value=\"Fair\"> Fair<BR>"; echo "<INPUT type=\"radio\" name=\"f_noise\" value=\"Good\"> Good<BR>"; echo "<INPUT type=\"radio\" name=\"f_noise\" value=\"Excellent\"> Excellent<BR>"; echo "<INPUT type=\"submit\" value=\"Send\"> <INPUT type=\"reset\">"; echo "</P>"; echo "</FORM>"; // if(isset($_POST['Send'])){ // $tmpVar1 = $_POST['f_time']; //$tmpVar2 = $_POST['f_date']; // $tmpVar3 = $_POST['f_number']; // $tmpVar4 = $_POST['f_destination']; // $tmpVar5 = $_POST['f_friend']; // $tmpVar6 = $_POST['f_space']; // $tmpVar7 = $_POST['f_comfort']; // $tmpVar8 = $_POST['f_clean']; // $tmpVar9 = $_POST['f_noise']; // $insert = "INSERT INTO `airline`.`surveys` ( // `f_date` , //`f_time` , //`f_number` , //`f_destination` , //`f_friend` , //`f_space` , //`f_comfort` , //`f_clean` , //`f_noise` //) //VALUES ($tmpVar1, $tmpVar2, $tmpVar3, $tmpVar4, $tmpVar5, $tmpVar6, $tmpVar7, $tmpVar8, $tmpVar9);"; //$insertQuery = mysql_query($insert, $DBConnect); // if($insertQuery === FALSE){ // echo "<p>Survey failed to save to the database.</p>"; // } //else{ // echo "<p>Survey Complete!</p>"; // } // $SQLSelect = "SELECT * FROM surveys"; // $QueryResult = mysql_query($SQLSelect, $DBConnect); // echo "<table width='100' border='1'>\n"; // echo "<tr><th>Flight Date</th><th>Flight Time</th><th>Flight //Number</th><th>Destination</th><th>Friendliness</th><th>Storage Space</th><th>Comfort</th><th>Cleanliness</th><th>Noise</th></tr>\n"; // while (($Row = mysql_fetch_row($QueryResult)) !== FALSE) { //count $row array //for loop to iterate rows // echo "<tr><td>{$Row[0]}</td>"; // echo "<td>{$Row[1]}</td>"; // echo "<td>{$Row[2]}</td>"; // echo "<td align='right'>{$Row[3]}</td>"; // echo "<td>{$Row[4]}</td></tr>"; // } // echo "</table>\n"; //Sorry for this mess. was trying to post into the middle of my code thinking it would work. If I set it up to start with isset, it would be false initially //The database would create, then everytime after isset would be true....maybe ill repost ina little while } } } } } //mysql_close($DBConnet); ?> action file. <?php ini_set('display_errors', 'On'); error_reporting(E_ALL); if(isset($_POST['Send'])){ $tmpVar1 = $_POST['f_time']; $tmpVar2 = $_POST['f_date']; $tmpVar3 = $_POST['f_number']; $tmpVar4 = $_POST['f_destination']; $tmpVar5 = $_POST['f_friend']; $tmpVar6 = $_POST['f_space']; $tmpVar7 = $_POST['f_comfort']; $tmpVar8 = $_POST['f_clean']; $tmpVar9 = $_POST['f_noise']; $insert = "INSERT INTO `airline`.`surveys` ( `f_date` , `f_time` , `f_number` , `f_destination` , `f_friend` , `f_space` , `f_comfort` , `f_clean` , `f_noise` ) VALUES ($tmpVar1, $tmpVar2, $tmpVar3, $tmpVar4, $tmpVar5, $tmpVar6, $tmpVar7, $tmpVar8, $tmpVar9);"; $createTable = "CREATE TABLE `surveys` ( `f_date` VARCHAR( 30 ) NOT NULL , `f_time` VARCHAR( 30 ) NOT NULL , `f_number` VARCHAR( 30 ) NOT NULL , `f_destination` VARCHAR( 30 ) NOT NULL , `f_friend` VARCHAR( 30 ) NOT NULL , `f_space` VARCHAR( 30 ) NOT NULL , `f_comfort` VARCHAR( 30 ) NOT NULL , `f_clean` VARCHAR( 30 ) NOT NULL , `f_noise` VARCHAR( 50 ) NOT NULL );"; $DBConnect = mysql_connect("127.0.0.1", "root", "noonan79"); if($DBConnect == FALSE){ echo "<p>Connection Error: " . mysql_error() . "</p>\n"; }else { $insertQuery = mysql_query($insert, $DBConnect); if($insertQuery === FALSE){ echo "<p>Survey failed to save to the database.</p>"; } else{ echo "<p>Survey Complete!</p>"; $SQLSelect = "SELECT * FROM surveys"; $QueryResult = mysql_query($SQLSelect, $DBConnect); echo "<table width='100' border='1'>\n"; echo "<tr><th>Flight Date</th><th>Flight Time</th><th>Flight Number</th><th>Destination</th><th>Friendliness</th><th>Storage Space</th><th>Comfort</th><th>Cleanliness</th><th>Noise</th></tr>\n"; //while (($Row = mysql_fetch_row($QueryResult)) !== FALSE) { //count $row array //for loop to iterate rows // echo "<tr><td>{$Row[0]}</td>"; // echo "<td>{$Row[1]}</td>"; // echo "<td>{$Row[2]}</td>"; // echo "<td align='right'>{$Row[3]}</td>"; // echo "<td>{$Row[4]}</td></tr>"; //} echo "</table>\n"; echo "<h2>Survey</h2>"; echo "<FORM action=\"Surveyprocess.php\" method=\"post\">"; echo "<P>"; echo "Flight Time: <INPUT type=\"text\" name=\"f_time\"><BR>"; echo "Flight Date: <INPUT type=\"text\" name=\"f_date\"><BR>"; echo "Flight Number: <INPUT type=\"text\" name=\"f_number\"><BR>"; echo "Destination: <INPUT type=\"text\" name=\"f_destination\"><BR>"; echo "<p>How would you rate the friendliness of the staff?</p>"; echo "<INPUT type=\"radio\" name=\"f_friend\" value=\"No Opinion\"> No Opinion<BR>"; echo "<INPUT type=\"radio\" name=\"f_friend\" value=\"Poor\"> Poor<BR>"; echo "<INPUT type=\"radio\" name=\"f_friend\" value=\"Fair\"> Fair<BR>"; echo "<INPUT type=\"radio\" name=\"f_friend\" value=\"Good\"> Good<BR>"; echo "<INPUT type=\"radio\" name=\"f_friend\" value=\"Excellent\"> Excellent<BR>"; echo "<p>How would you rate the storage space on the plane?</p>"; echo "<INPUT type=\"radio\" name=\"f_space\" value=\"No Opinion\"> No Opinion<BR>"; echo "<INPUT type=\"radio\" name=\"f_space\" value=\"Poor\"> Poor<BR>"; echo "<INPUT type=\"radio\" name=\"f_space\" value=\"Fair\"> Fair<BR>"; echo "<INPUT type=\"radio\" name=\"f_space\" value=\"Good\"> Good<BR>"; echo "<INPUT type=\"radio\" name=\"f_space\" value=\"Excellent\"> Excellent<BR>"; echo "<p>How would you rate the comfort on the plane?</p>"; echo "<INPUT type=\"radio\" name=\"f_comfort\" value=\"No Opinion\"> No Opinion<BR>"; echo "<INPUT type=\"radio\" name=\"f_comfort\" value=\"Poor\"> Poor<BR>"; echo "<INPUT type=\"radio\" name=\"f_comfort\" value=\"Fair\"> Fair<BR>"; echo "<INPUT type=\"radio\" name=\"f_comfort\" value=\"Good\"> Good<BR>"; echo "<INPUT type=\"radio\" name=\"f_comfort\" value=\"Excellent\"> Excellent<BR>"; echo "<p>How would you rate the cleanliness of the plane?</p>"; echo "<INPUT type=\"radio\" name=\"f_clean\" value=\"No Opinion\"> No Opinion<BR>"; echo "<INPUT type=\"radio\" name=\"f_clean\" value=\"Poor\"> Poor<BR>"; echo "<INPUT type=\"radio\" name=\"f_clean\" value=\"Fair\"> Fair<BR>"; echo "<INPUT type=\"radio\" name=\"f_clean\" value=\"Good\"> Good<BR>"; echo "<INPUT type=\"radio\" name=\"f_clean\" value=\"Excellent\"> Excellent<BR>"; echo "<p>How would you rate the noise level on the plane?</p>"; echo "<INPUT type=\"radio\" name=\"f_noise\" value=\"No Opinion\"> No Opinion<BR>"; echo "<INPUT type=\"radio\" name=\"f_noise\" value=\"Poor\"> Poor<BR>"; echo "<INPUT type=\"radio\" name=\"f_noise\" value=\"Fair\"> Fair<BR>"; echo "<INPUT type=\"radio\" name=\"f_noise\" value=\"Good\"> Good<BR>"; echo "<INPUT type=\"radio\" name=\"f_noise\" value=\"Excellent\"> Excellent<BR>"; echo "<INPUT type=\"submit\" value=\"Send\"> <INPUT type=\"reset\">"; echo "</P>"; echo "</FORM>"; } } } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.