Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 214 lines (178 sloc) 11.197 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
<?php

session_start();

include("header.php");

if (!isset($_SESSION['user_id']) || !is_numeric($_SESSION['user_id'])) {
echo("<p><b>Sorry, but you must login to access to this page!</b></p>");
exit;
}

if ($_GET['edit'] == "yes") {
// Get The Input
$price = $_POST[group1];
$delivery = $_POST[group2];
  $takeout = $_POST[group3];
$groups = $_POST[group4];
  $reservations = $_POST[group5];
$outsideSeating = $_POST[group6];
$bar = $_POST[group7];
$kids = $_POST[group8];
  $speed = $_POST[group9];
$steakhouse = $_POST[group10];
$american = $_POST[group11];
$middleEastern = $_POST[group12];
$asian = $_POST[group13];
$italian = $_POST[group14];
  $chinese = $_POST[group15];
$japanese = $_POST[group16];
$indian = $_POST[group17];
$french = $_POST[group18];
$greek = $_POST[group19];
$mexican = $_POST[group20];
  $vegetarian = $_POST[group21];
$seafood = $_POST[group22];

$errormess = "";


if ($errormess == "") {
@mysqli_query($db, "Update `Users` set price=$price, delivery=$delivery, takeout=$takeout, accommodate_groups=$groups, reservations=$reservations, outside_seating=$outsideSeating, bar=$bar, kids=$kids, fast_food=$speed, steakhouse_influence=$steakhouse, american_influence=$american, middle_eastern_influence=$middleEastern, asian_influence=$asian, italian_influence=$italian, chinese_influence=$chinese, japanese_influence=$japanese, indian_influence=$indian, french_influence=$french, greek_influence=$greek, mexican_influence=$mexican, vegetarian_influence=$vegetarian, seafood_influence=$seafood where user_id='".$_SESSION['user_id']."'") or die("You must answer all the questions.");
echo("<p>Your survey results have been updated!<br /><br /><a href=\"index.php\">Click Here To Go To The Home Page</a></p>");
include("footer.php");
exit;
} else {
echo($errormess);
include("footer.php");
exit;
}

}

?>
<center>

<form action="survey.php?edit=yes" method="post">
<center>
<b><p><i><font size="5.5" face="Georgia" color="000066">S</font><font size="4.5" face="Georgia">urvey:</p></b></i></font>
</center>

<font size="2" face="Georgia" color="black">

<table border="0" cellpadding="0" cellspacing="0">

<tr><td align="left"><b>How much do you prefer spending per person (on average)?</b></td></tr>
<tr><td align="left"><input type="radio" name="group1" value="1"> Cheap (Up to $10)</td></tr>
<tr><td align="left"><input type="radio" name="group1" value="2"> Moderate (Up to $30)</td></tr>
<tr><td align="left"><input type="radio" name="group1" value="3"> Expensive (Up to $60)</td></tr>


<tr><td align="left"><b>Do you prefer a restaurant that offers delivery?</b></td></tr>
<tr><td align="left"><input type="radio" name="group2" value="1"> Yes </td></tr>
<tr><td align="left"><input type="radio" name="group2" value="0"> No </td></tr>

<tr><td align="left"><b>Do you prefer a restaurant that offers takeout?</b></td></tr>
<tr><td align="left"><input type="radio" name="group3" value="1"> Yes </td></tr>
<tr><td align="left"><input type="radio" name="group3" value="0"> No </td></tr>

<tr><td align="left"><b>Do you prefer a restaurant that can accommodate groups?</b></td></tr>
<tr><td align="left"><input type="radio" name="group4" value="1"> Yes </td></tr>
<tr><td align="left"><input type="radio" name="group4" value="0"> No </td></tr>

<tr><td align="left"><b>Do you prefer a restaurant that accepts reservations?</b></td></tr>
<tr><td align="left"><input type="radio" name="group5" value="1"> Yes </td></tr>
<tr><td align="left"><input type="radio" name="group5" value="0"> No </td></tr>

<tr><td align="left"><b>Do you prefer a restaurant that has outside seating?</b></td></tr>
<tr><td align="left"><input type="radio" name="group6" value="1"> Yes </td></tr>
<tr><td align="left"><input type="radio" name="group6" value="0"> No </td></tr>

<tr><td align="left"><b>Do you prefer a restaurant that has a full bar?</b></td></tr>
<tr><td align="left"><input type="radio" name="group7" value="1"> Yes </td></tr>
<tr><td align="left"><input type="radio" name="group7" value="0"> No </td></tr>

<tr><td align="left"><b>Do you prefer a restaurant that is good for kids?</b></td></tr>
<tr><td align="left"><input type="radio" name="group8" value="1"> Yes </td></tr>
<tr><td align="left"><input type="radio" name="group8" value="0"> No </td></tr>

<tr><td align="left"><b>On a scale of 1 to 5, how fast do you want your service to be?</b></td></tr>
<tr><td align="left"><input type="radio" name="group9" value="1"> 1 (Sluggish) </td></tr>
<tr><td align="left"><input type="radio" name="group9" value="2"> 2 </td></tr>
<tr><td align="left"><input type="radio" name="group9" value="3"> 3 (Moderate)</td></tr>
<tr><td align="left"><input type="radio" name="group9" value="4"> 4 </td></tr>
<tr><td align="left"><input type="radio" name="group9" value="5"> 5 (Super fast)</td></tr>
<tr> </tr><tr> </tr>
<tr><td align="left"><b>On a scale of 1 to 5, how much do you prefer this type of restaurant?</b></tr>
<tr><td align="center"><b>Steakhouse</b></td></tr>
<tr><td align="center"><input type="radio" name="group10" value="1"> 1 </td></tr>
<tr><td align="center"><input type="radio" name="group10" value="2"> 2 </td></tr>
<tr><td align="center"><input type="radio" name="group10" value="3"> 3 </td></tr>
<tr><td align="center"><input type="radio" name="group10" value="4"> 4 </td></tr>
<tr><td align="center"><input type="radio" name="group10" value="5"> 5 </td></tr>

<tr><td align="center"><b>American</b></td></tr>
<tr><td align="center"><input type="radio" name="group11" value="1"> 1 </td></tr>
<tr><td align="center"><input type="radio" name="group11" value="2"> 2 </td></tr>
<tr><td align="center"><input type="radio" name="group11" value="3"> 3 </td></tr>
<tr><td align="center"><input type="radio" name="group11" value="4"> 4 </td></tr>
<tr><td align="center"><input type="radio" name="group11" value="5"> 5 </td></tr>

<tr><td align="center"><b>Middle Eastern</b></td></tr>
<tr><td align="center"><input type="radio" name="group12" value="1"> 1 </td></tr>
<tr><td align="center"><input type="radio" name="group12" value="2"> 2 </td></tr>
<tr><td align="center"><input type="radio" name="group12" value="3"> 3 </td></tr>
<tr><td align="center"><input type="radio" name="group12" value="4"> 4 </td></tr>
<tr><td align="center"><input type="radio" name="group12" value="5"> 5 </td></tr>

<tr><td align="center"><b>Asian</b></td></tr>
<tr><td align="center"><input type="radio" name="group13" value="1"> 1 </td></tr>
<tr><td align="center"><input type="radio" name="group13" value="2"> 2 </td></tr>
<tr><td align="center"><input type="radio" name="group13" value="3"> 3 </td></tr>
<tr><td align="center"><input type="radio" name="group13" value="4"> 4 </td></tr>
<tr><td align="center"><input type="radio" name="group13" value="5"> 5 </td></tr>

<tr><td align="center"><b>Italian</b></td></tr>
<tr><td align="center"><input type="radio" name="group14" value="1"> 1 </td></tr>
<tr><td align="center"><input type="radio" name="group14" value="2"> 2 </td></tr>
<tr><td align="center"><input type="radio" name="group14" value="3"> 3 </td></tr>
<tr><td align="center"><input type="radio" name="group14" value="4"> 4 </td></tr>
<tr><td align="center"><input type="radio" name="group14" value="5"> 5 </td></tr>

<tr><td align="center"><b>Chinese</b></td></tr>
<tr><td align="center"><input type="radio" name="group15" value="1"> 1 </td></tr>
<tr><td align="center"><input type="radio" name="group15" value="2"> 2 </td></tr>
<tr><td align="center"><input type="radio" name="group15" value="3"> 3 </td></tr>
<tr><td align="center"><input type="radio" name="group15" value="4"> 4 </td></tr>
<tr><td align="center"><input type="radio" name="group15" value="5"> 5 </td></tr>

<tr><td align="center"><b>Japanese</b></td></tr>
<tr><td align="center"><input type="radio" name="group16" value="1"> 1 </td></tr>
<tr><td align="center"><input type="radio" name="group16" value="2"> 2 </td></tr>
<tr><td align="center"><input type="radio" name="group16" value="3"> 3 </td></tr>
<tr><td align="center"><input type="radio" name="group16" value="4"> 4 </td></tr>
<tr><td align="center"><input type="radio" name="group16" value="5"> 5 </td></tr>

<tr><td align="center"><b>Indian</b></td></tr>
<tr><td align="center"><input type="radio" name="group17" value="1"> 1 </td></tr>
<tr><td align="center"><input type="radio" name="group17" value="2"> 2 </td></tr>
<tr><td align="center"><input type="radio" name="group17" value="3"> 3 </td></tr>
<tr><td align="center"><input type="radio" name="group17" value="4"> 4 </td></tr>
<tr><td align="center"><input type="radio" name="group17" value="5"> 5 </td></tr>

<tr><td align="center"><b>French</b></td></tr>
<tr><td align="center"><input type="radio" name="group18" value="1"> 1 </td></tr>
<tr><td align="center"><input type="radio" name="group18" value="2"> 2 </td></tr>
<tr><td align="center"><input type="radio" name="group18" value="3"> 3 </td></tr>
<tr><td align="center"><input type="radio" name="group18" value="4"> 4 </td></tr>
<tr><td align="center"><input type="radio" name="group18" value="5"> 5 </td></tr>

<tr><td align="center"><b>Greek</b></td></tr>
<tr><td align="center"><input type="radio" name="group19" value="1"> 1 </td></tr>
<tr><td align="center"><input type="radio" name="group19" value="2"> 2 </td></tr>
<tr><td align="center"><input type="radio" name="group19" value="3"> 3 </td></tr>
<tr><td align="center"><input type="radio" name="group19" value="4"> 4 </td></tr>
<tr><td align="center"><input type="radio" name="group19" value="5"> 5 </td></tr>

<tr><td align="center"><b>Mexican</b></td></tr>
<tr><td align="center"><input type="radio" name="group20" value="1"> 1 </td></tr>
<tr><td align="center"><input type="radio" name="group20" value="2"> 2 </td></tr>
<tr><td align="center"><input type="radio" name="group20" value="3"> 3 </td></tr>
<tr><td align="center"><input type="radio" name="group20" value="4"> 4 </td></tr>
<tr><td align="center"><input type="radio" name="group20" value="5"> 5 </td></tr>

<tr><td align="center"><b>Vegetarian</b></td></tr>
<tr><td align="center"><input type="radio" name="group21" value="1"> 1 </td></tr>
<tr><td align="center"><input type="radio" name="group21" value="2"> 2 </td></tr>
<tr><td align="center"><input type="radio" name="group21" value="3"> 3 </td></tr>
<tr><td align="center"><input type="radio" name="group21" value="4"> 4 </td></tr>
<tr><td align="center"><input type="radio" name="group21" value="5"> 5 </td></tr>

<tr><td align="center"><b>Seafood</b></td></tr>
<tr><td align="center"><input type="radio" name="group22" value="1"> 1 </td></tr>
<tr><td align="center"><input type="radio" name="group22" value="2"> 2 </td></tr>
<tr><td align="center"><input type="radio" name="group22" value="3"> 3 </td></tr>
<tr><td align="center"><input type="radio" name="group22" value="4"> 4 </td></tr>
<tr><td align="center"><input type="radio" name="group22" value="5"> 5 </td></tr>
</table>
<table>
<tr><td>&nbsp;</td><td align="center"><input type="submit" value="Submit Survey"></td></tr>
</table>
</form>

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</center>

<?php
include("footer.php");
exit;
?>
Something went wrong with that request. Please try again.