PHP Code:
<?php
// check to see if the user has submitted the form
if( isset( $_POST['course'] ) ) {
echo"THANK YOU";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Feedback Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body><form name="BasicForm" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
My name is Fizlar and I am currently studying for my Masters degree in Information
Systems at the University of Sheffield, England. This questionnaire is part of
my on-going research to try to gain a comprehensive understanding of the problems
that users like yourself experience when querying a database.<br>
<p> </p>
<form method="post">
<p>Can You Please type your age </p>
<input name="AGE" type="text" value="AGE" size="10">
<p>What is your first language if not English</p>
<textarea name="LANG" cols="60" rows="3" wrap="virtual">TYPE IN HERE</textarea>
<p> </p>
<p>Q1, WHAT, IF ANYTHING, WOULD YOU SAY HINDERS YOUR ABILITY TO USE A COMPUTER
EFFECTIVLY?</p>
<p>
<textarea name="QUES1" cols="60" rows="3" wrap="virtual">TYPE IN HERE</textarea>
<p>Q2, IN WHAT WAY DOES YOUR NATIVE LANGUAGE AFFECT YOUR ABILITY TO SEARCH FOR
A PARTICULAR PIECE OF INFORMATION?
<p>
<textarea name="QUES2" cols="60" rows="3" wrap="virtual">TYPE IN HERE</textarea>
<p>Q3, DO YOU THINK THIS TYPE OF SEARCHING IS HELPFUL? </p>
<p>
<input type="radio" name="rating1" value="1">
1 Very Helpful<br />
<input type="radio" name="rating1" value="2">
2 Helpful<br />
<input type="radio" name="rating1" value="3">
3 Uudecided<br />
<input type="radio" name="rating1" value="4">
4 Unhelpful<br />
<input type="radio" name="rating1" value="5">
5 Very Unhelpful<br />
<p>Q4, WHEN SUBMITTING YOUR FIRST QUERY, WERE THE RESULTS RETURNED SATISFACTORY
TO <br>
YOUR NEEDS?</p>
<p>
<input type="radio" name="rating2" value="1">
1 Very Satisfactory<br />
<input type="radio" name="rating2" value="2">
2 Satisfactory<br />
<input type="radio" name="rating2" value="3">
3 Undecided<br />
<input type="radio" name="rating2" value="4">
4 Unsatisfactory<br />
<input type="radio" name="rating2" value="5">
5 Very Unsatisfactory
<p>Q5, IF NOT SATISFACTORY WHY NOT?
<p>
<textarea name="QUES5" cols="60" rows="3" wrap="virtual">TYPE IN HERE</textarea>
<br />
<p>Q6, HOW USEFUL DID YOU FIND THE RESULTS FROM YOUR FIRST QUERY? </p>
<p>
<input type="radio" name="rating3" value="1">
1 Very Useful<br />
<input type="radio" name="rating3" value="2">
2 Useful<br />
<input type="radio" name="rating3" value="3">
3 Undecided<br />
<input type="radio" name="rating3" value="4">
4 Unhelpful<br />
<input type="radio" name="rating3" value="5">
5 Very Unhelpful<br />
</p>
<p>Q7, DID THE RESULTS OF THE FIRST QUERY, SUPPORT YOU IN FINDING THE INFORMATION
YOU REQUIRED? </p>
<p>
<input type="radio" name="rating4" value="1">
1 Yes<br />
<input type="radio" name="rating4" value="2">
2 No <br />
<input type="radio" name="rating4" value="3">
3 Undecided <br />
</p>
<p>Q8, IF YOU WERE UNABLE TO RETRIEVE THE INFORMATION YOU REQUIRED FIRST TIME
WERE YOU <br>
ABLE TO RETRIEVE IT ON SUBSEQUENT SEARCHES? </p>
<p>
<input type="radio" name="rating5" value="3">
1 Yes<br />
<input type="radio" name="rating5" value="2">
2 No<br />
<input type="radio" name="rating5" value="1">
3 Undecided<br />
<p>Q9, WERE THERE ANY PARTS OF THE QUERYING PROCESS THAT WERE PARTICULARLY DIFFICULT
TO USE?
<p>
<textarea name="QUES9" cols="60" rows="3" wrap="virtual">TYPE IN HERE</textarea>
<p>
<p>Q10, DO YOU FIND THIS TYPE OF DESIGN USEFUL TO YOU IN FINDING INFORMATON?</p>
<p>
<input type="radio" name="rating6" value="1">
1 Very Useful<br />
<input type="radio" name="rating6" value="2">
2 Useful<br />
<input type="radio" name="rating6" value="3">
3 Undecided<br />
<input type="radio" name="rating6" value="4">
4 Unhelpful<br />
<input type="radio" name="rating6" value="5">
5 Very Unhelpful</p>
<p>Q11, OVERALL, HOW DID THIS WEBSITE ASSIST YOU INTO FINDING INFORMATION YOU
REQUIRED? </p>
<p>
<input type="radio" name="rating7" value="1">
1 Very Helpful<br />
<input type="radio" name="rating7" value="2">
2 Useful<br />
<input type="radio" name="rating7" value="3">
3 Undecided<br />
<input type="radio" name="rating7" value="4">
4 Unhelpful<br />
<input type="radio" name="rating7" value="5">
5 Very Unhelpful</p>
<p>Q12, WAS THE LAYOUT OF THE WEBSITE CLEAR AND EASY TO NAVIGATE?</p>
<p>
<input type="radio" name="rating8" value="1">
1 Yes<br />
<input type="radio" name="rating8" value="2">
2 No<br />
<input type="radio" name="rating8" value="3">
3 Undecided<br />
</p>
<p>Q13, IF NOWHY NOT? </p>
<p>
<textarea name="QUES13" cols="60" rows="3" wrap="virtual">TYPE IN HERE</textarea>
<br />
<p> Q14, CAN YOU SUGGEST ANY FUTURE IMPROVEMENTS THAT COULD MAKE THE LOOK AND
FEEL OF THE SITE EASIER TO USE?
<p>
<textarea name="QUES14" cols="60" rows="3" wrap="virtual">TYPE IN HERE</textarea>
<p>Q15, COMPARED TO ANY PREVIOUS EXPERIENCE IN QUERYING FOR INFORMATION - HOW
DID THIS<br>
SEARCH ENGINE FARE IN COMPARISON?</p>
<p>
<input type="radio" name="rating9" value="1">
1 Very Useful<br />
<input type="radio" name="rating9" value="2">
2 Useful<br />
<input type="radio" name="rating9" value="3">
3 Undecided<br />
<input type="radio" name="rating9" value="4">
4 Unhelpful<br />
<input type="radio" name="rating9" value="5">
5 Very Unhelpful</p>
<p>Q16, CAN YOU SUGGEST ANY FURTHER IMPROVEMENTS THAT WOULD ASSIST YOU IN THE
QUERYING PROCESS?</p>
<p>
<textarea name="QUES16" cols="60" rows="3" wrap="virtual">TYPE IN HERE</textarea>
<p>Q17, HOW WOULD YOU RATE THIS SEARCH ENGINE ON A SCALE OF 1 – 5 WHERE
ONE IS VERY POOR AND FIVE IS EXCELLENT?</p>
<p>
<input type="radio" name="rating10" value="1">
1 Very Poor<br />
<input type="radio" name="rating10" value="2">
2 Poor<br />
<input type="radio" name="rating10" value="3">
3 Undecided<br />
<input type="radio" name="rating10" value="4">
4 Good<br />
<input type="radio" name="rating10" value="5">
5 Excellentl</p>
<p>
<input type="submit" name="course" value="Submit">
</p>
</form>
<?
$R1 = $_REQUEST['rating1'];
$R2 = $_REQUEST['rating2'];
$R3 = $_REQUEST['rating3'];
$R4 = $_REQUEST['rating4'];
$R5 = $_REQUEST['rating5'];
$R6 = $_REQUEST['rating6'];
$R7 = $_REQUEST['rating7'];
$R8 = $_REQUEST['rating8'];
$R9 = $_REQUEST['rating9'];
$R10 = $_REQUEST['rating10'];
$Tx1 = $_REQUEST['QUES1'];
$Tx2 = $_REQUEST['QUES2'];
$Tx3 = $_REQUEST['QUES5'];
$Tx4 = $_REQUEST['QUES9'];
$Tx5 = $_REQUEST['QUES13'];
$Tx6 = $_REQUEST['QUES14'];
$Tx7 = $_REQUEST['QUES16'];
$age = $_REQUEST['AGE'];
$lang = $_REQUEST['LANG'];
$sql = "INSERT INTO QUESTION (Num_id, Age, LANG, Question1, Question2, Question3, Question4, Question5, Question6, Question7, Question8, Question9, Question10, Question11, Question12, Question13, Question14, Question15, Question16, Question17) VALUES (NULL,'$age','$lang','$Tx1','$Tx2','$R1','$R2','$Tx3','$R3','$R4','$R5','$Tx4','$R6','$R7','$R8','$Tx5','$Tx6','$R9','$Tx7','$R10')";
$user = "****";
$pass = "***** ";
$db = "***";
$link = mysql_connect( "localhost", $user, $pass );
if (! $link)
die ("could not connect to MySQL");
mysql_select_db ($db)
or die ("could not connect to $db: ".mysql_error() );
$result = mysql_query ($sql);
?>
/body>
</html>
Bookmarks