";
$endSelect = "";
$wholeHTML = "";
$getDropdownID = "";
$hidTag = "";
if (isset($_GET['Submit1'])) {
$getDropdownID = $_GET['drop1'];
header ("Location: survey.php?h1=" . $getDropdownID);
}
$database = "survey";
$db_found = new mysqli(DB_SERVER, DB_USER, DB_PASS, $database );
if ($db_found) {
$stmt = $db_found->prepare("SELECT ID, Question FROM tblsurvey");
if ($stmt) {
$stmt->execute();
$res = $stmt->get_result();
if ($res->num_rows > 0) {
while ( $row = $res->fetch_assoc() ) {
$qID = $row['ID'];
$question = $row['Question'];
$dropdown = $dropdown . "" . "
";
}
$wholeHTML = $startSelect . $dropdown . $endSelect;
}
else {
print "Error - No rows";
}
}
else {
print "Error - DB ERROR";
}
}
else {
print "Error getting Survey";
}
?>