|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
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: 215: 216: 217: 218: 219: 220: 221: 222: 223: 224: 225: 226: 227: 228: 229: 230: 231: 232: 233: 234: 235: 236: 237: 238: 239: 240: 241: 242: 243: 244: 245: 246: 247: 248: 249: 250: 251: 252: 253: 254: 255: 256: 257: 258: 259: 260: 261: 262: 263: 264: 265: 266: 267: 268: 269: 270: 271: 272: 273: 274: 275: 276: 277: 278: 279: 280: 281: 282: 283: 284: 285: 286: 287: 288: 289: 290: 291: 292: 293: 294: 295: 296: 297: 298: 299: 300: 301: 302: 303: 304: 305: 306: 307: 308: 309: 310: 311: 312: 313: 314: 315: 316: 317: 318: 319: 320: 321: 322: 323: 324: 325: 326: 327: 328: 329: 330: 331: 332: 333: 334: 335: 336: 337: 338: 339: 340: 341: 342: 343: 344: 345: 346: 347: 348: 349: 350: 351: 352: 353: 354: 355: 356: 357: 358: 359: 360: 361: 362: 363: 364: 365: 366: 367: 368: 369: 370: 371: 372: 373: 374: 375: 376: 377: 378: 379: 380: 381: 382: 383: 384: 385: 386: 387: 388: 389: 390: 391: 392: 393: 394: 395: 396: 397: 398: 399: 400: 401: 402: 403: 404: 405: 406: 407: 408: 409: 410: 411: 412: 413: 414: 415: 416: 417: 418: 419: 420: 421: 422: 423: 424: 425: 426: 427: 428: 429: 430: 431: 432: 433: 434: 435: 436: 437: 438: 439: 440: 441: 442: 443: 444: 445: 446: 447: 448: 449: 450: 451: 452: 453: 454: 455: 456: 457: 458: 459: 460: 461: 462: 463: 464: 465: 466: 467: 468: 469: 470: 471: 472: 473: 474: 475: 476: 477: 478: 479: 480: 481: 482: 483: 484: 485: 486: 487: 488: 489: 490: 491: 492: 493: 494: 495: 496: 497: 498: 499: 500: 501: 502: 503: 504: 505: 506: 507: 508: 509: 510: 511: 512: 513: 514: 515: 516: 517: 518: 519: 520: 521: 522: 523: 524: 525: 526: 527: 528: 529: 530: 531: 532: 533: 534: 535: 536: 537: 538: 539: 540: 541: 542: 543: 544: 545: 546: 547: 548: 549: 550: 551: 552: 553: 554: 555: 556: 557: 558: 559: 560: 561: 562: 563: 564: 565: 566: 567: 568: 569: 570: 571: 572: 573: 574: 575: 576: 577: 578: 579: 580: |
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title><?php echo $page_title; ?></title>
<style type="text/css" media="all">@import "layout1.css";</style>
</head>
<body>
<div id="wrap"><!-- Goes with the CSS layout. -->
<!-- Script 7.1 - header.html -->
<!-- Start of page-specific content. -->
<?php # Script 7.7 - register.php (3rd version after Scripts 7.3 & 7.5)
$page_title = 'Register';
// Check if the form has been submitted.
if (isset($_POST['submitted'])) {
require_once ('mysql_connect.php'); // Connect to the db.
// Create a function for escaping the data.
function escape_data ($data) {
global $dbc; // Need the connection.
if (ini_get('magic_quotes_gpc')) {
$data = stripslashes($data);
}
return mysql_real_escape_string(trim($data), $dbc);
} // End of function.
$errors = array(); // Initialize error array.
// Check for a first number.
if (empty($_POST['number'])) {
$errors[] = 'You forgot to enter your house/flat number.';
} else {
$n = escape_data($_POST['number']);
}
// Check for a firstline.
if (empty($_POST['firstline'])) {
$errors[] = 'You forgot to enter the first line of your address.';
} else {
$fl = escape_data($_POST['firstline']);
}
// Check for an secondline.
if (empty($_POST['secondline'])) {
$sl = escape_data($_POST['secondline']);
} else {
$sl = escape_data($_POST['secondline']);
}
if (empty($_POST['city'])) {
$errors[] = 'You forgot to enter the city.';
} else {
$c = escape_data($_POST['city']);
}
if (empty($_POST['county'])) {
$co = escape_data($_POST['county']);
} else {
$co = escape_data($_POST['county']);
}
if (empty($_POST['postcode'])) {
$pc = escape_data($_POST['postcode']);
} else {
$pc = escape_data($_POST['postcode']);
}
//included in rent check box button validation
if(empty($_POST["water"])){
$water="";
}else{
$water = trim($_POST["water"]);
}
if(empty($_POST["gas"])){
$gas="";
}else{
$gas = trim($_POST["gas"]);
}
if(empty($_POST["electric"])){
$electric="";
}else{
$electric = trim($_POST["electric"]);
}
if(empty($_POST["internet"])){
$internet="";
}else{
$internet = trim($_POST["internet"]);
}
if(empty($_POST["skycable"])){
$skycable="";
}else{
$skycable = trim($_POST["skycable"]);
}
if(empty($_POST["cleaning"])){
$cleaning="";
}else{
$cleaning = trim($_POST["cleaning"]);
}
//facilites avaliable
if(empty($_POST["furniture"])){
$furniture="";
}else{
$furniture = trim($_POST["furniture"]);
}
if(empty($_POST["washmachine"])){
$washmachine="";
}else{
$washmachine = trim($_POST["washmachine"]);
}
if(empty($_POST["dryer"])){
$dryer="";
}else{
$dryer = trim($_POST["dryer"]);
}
if(empty($_POST["cooker"])){
$cooker="";
}else{
$cooker = trim($_POST["cooker"]);
}
if(empty($_POST["fridge"])){
$fridge="";
}else{
$fridge = trim($_POST["fridge"]);
}
if(empty($_POST["doubleglazing"])){
$doubleglazing="";
}else{
$doubleglazing = trim($_POST["doubleglazing"]);
}
if(empty($_POST["heating"])){
$heating="";
}else{
$heating = trim($_POST["heating"]);
}
if(empty($_POST["alarm"])){
$alarm="";
}else{
$alarm = trim($_POST["alarm"]);
}
if(empty($_POST["firealarm"])){
$firealarm="";
}else{
$firealarm = trim($_POST["firealarm"]);
}
if(empty($_POST["locks"])){
$locks="";
}else{
$locks = trim($_POST["locks"]);
}
if(empty($_POST["parking"])){
$parking="";
}else{
$parking = trim($_POST["parking"]);
}
if(empty($_POST["entrance"])){
$entrance="";
}else{
$entrance = trim($_POST["entrance"]);
}
if(empty($_POST["commonroom"])){
$commonroom="";
}else{
$commonroom = trim($_POST["commonroom"]);
}
if(empty($_POST["bath"])){
$bath="";
}else{
$bath = trim($_POST["bath"]);
}
if(empty($_POST["shower"])){
$shower="";
}else{
$shower = trim($_POST["shower"]);
}
//beds
if (empty($_POST['beds'])) {
$beds = escape_data($_POST['beds']);
} else {
$beds = escape_data($_POST['beds']);
}
if (empty($_POST['dbeds'])) {
$dbeds = escape_data($_POST['dbeds']);
} else {
$dbeds = escape_data($_POST['dbeds']);
}
//rent validation
if (empty($_POST['rent'])) {
$re = escape_data($_POST['rent']);
} else {
$re = escape_data($_POST['rent']);
}
//rent paid validation
$rentpaid=$_POST['rentpaid'];
//distance to uni
$distanceuni=$_POST['distanceuni'];
$distanceshop=$_POST['distanceshop'];
$noise=$_POST['noise'];
$safety=$_POST['safety'];
$fandf=$_POST['fandf'];
$community=$_POST['community'];
//landlord estate agent
$polite=$_POST['polite'];
$flexability=$_POST['flexability'];
$contact=$_POST['contact'];
$jobdone=$_POST['jobdone'];
if (empty($_POST['comments'])) {
$comments = escape_data($_POST['comments']);
} else {
$comments = escape_data($_POST['comments']);
}
// Check for a password and match against the confirmed password.
//if (!empty($_POST['password1'])) {
//if ($_POST['password1'] != $_POST['password2']) {
//$errors[] = 'Your password did not match the confirmed password.';
//} else {
//$p = escape_data($_POST['password1']);
//}
//} else {
//$errors[] = 'You forgot to enter your password.';
//}
if (empty($errors)) { // If everything's okay.
// Register the user in the database.
// Check for previous registration.
//$query = "SELECT user_id FROM users WHERE email='$e'";
//$result = mysql_query($query);
//if (mysql_num_rows($result) == 0) {
// Make the query.
$query = "INSERT INTO address (number, firstline, secondline, city, county, postcode, water, gas, electric, internet, skycable, cleaning, rent, rentpaid, furniture, washmachine, dryer, cooker, fridge, doubleglazing, heating, alarm, firealarm, locks, parking, entrance, commonroom, bath, shower, beds, dbeds, distanceuni, distanceshop, noise, safety, fandf, community, polite, flexability, contact, jobdone, comments)
VALUES ('$n', '$fl', '$sl', '$c', '$co', '$pc', '$water', '$gas', '$electric', '$internet', '$skycable', '$cleaning', '$re', '$rentpaid', '$furniture', '$washmachine', '$dryer', '$cooker', '$fridge', '$doubleglazing', '$heating', '$alarm', '$firealarm', '$locks', '$parking', '$entrance', '$commonroom', '$bath', '$shower', '$beds', '$dbeds', '$distanceuni', '$distanceshop', '$noise', '$safety', '$fandf', '$community', '$polite', '$flexability', '$contact', '$jobdone', '$comments')";
$result = @mysql_query ($query); // Run the query.
if ($result) { // If it ran OK.
// Send an email, if desired.
// Print a message.
echo '<h1 id="mainhead">Thank you!</h1>
<p>Thank you for reviewing your student accommdation.</p><p><br /></p>';
// Include the footer and quit the script (to not show the form).
//include ('./includes/footer.html');
exit();
} else { // If it did not run OK.
echo '<h1 id="mainhead">System Error</h1>
<p class="error">You could not be registered due to a system error. We apologize for any inconvenience.</p>'; // Public message.
echo '<p>' . mysql_error() . '<br /><br />Query: ' . $query . '</p>'; // Debugging message.
include ('./includes/footer.html');
exit();
}
//} else { // Already registered.
//echo '<h1 id="mainhead">Error!</h1>
//<p class="error">The email address has already been registered.</p>';
//}
} else { // Report the errors.
echo '<h1 id="mainhead">Error!</h1>
<p class="error">The following error(s) occurred:<br />';
foreach ($errors as $msg) { // Print each error.
echo " - $msg<br />\n";
}
echo '</p><p>Please try again.</p><p><br /></p>';
} // End of if (empty($errors)) IF.
//mysql_close(); // Close the database connection.
} // End of the main Submit conditional.
?>
<body bgcolor="#ccccff">
<div id="header">
</div>
<div id="home">
<a href="index.html">
<img border="0" src="../images/home.jpg" width="115" height="34">
</a>
</div>
<div id="leave">
<a href="leave.html">
<img border="0" src="../images/leave.jpg" width="115" height="34">
</a>
</div>
<div id="help">
<a href="help.html">
<img border="0" src="../images/help.jpg" width="115" height="34">
</a>
</div>
<div id="search">
<a href="search.html">
<img border="0" src="../images/search.jpg" width="115" height="34">
</a>
</div>
<div id="main">
<div class="info">
<h2>Register House/Flat/Halls</h2>
<form action="register.php" method="post">
<p>ACCOMMODATION INFORMATION</p>
<p>Number: <input type="text" name="number" size="15" maxlength="15" value="<?php if (isset($_POST['number'])) echo $_POST['number']; ?>" /></p>
<p>First Line: <input type="text" name="firstline" size="15" maxlength="30" value="<?php if (isset($_POST['firstline'])) echo $_POST['firstline']; ?>" /></p>
<p>Second Line: <input type="text" name="secondline" size="20" maxlength="40" value="<?php if (isset($_POST['secondline'])) echo $_POST['secondline']; ?>" /> </p>
<p>City: <input type="text" name="city" size="10" maxlength="20" value="<?php if (isset($_POST['city'])) echo $_POST['city']; ?>" /></p>
<p>County: <input type="text" name="county" size="10" maxlength="20" value="<?php if (isset($_POST['county'])) echo $_POST['county']; ?>" /></p>
<p>Postcode: <input type="text" name="postcode" size="10" maxlength="20" value="<?php if (isset($_POST['postcode'])) echo $_POST['postcode']; ?>" /></p>
<p><br>Please tick which items are included in the rent.</br></p>
<p><input type="checkbox" name="water" value="water"/>Water </input></p>
<p><input type="checkbox" name="gas" value="gas"/>Gas </input></p>
<p><input type="checkbox" name="electric" value="electric"/>Electric </input></p>
<p><input type="checkbox" name="internet" value="internet"/>Internet </input></p>
<p><input type="checkbox" name="skycable" value="skycable"/>Sky/Cable </input></p>
<p><input type="checkbox" name="cleaning" value="cleaning"/>Cleaning </input></p>
<p><br>Please tick which facilities are avaliable to the occupier.</br></p>
<p><input type="checkbox" name="furniture" value="furniture"/>Furniture </input></p>
<p><input type="checkbox" name="washmachine" value="washmachine"/>Washing Mashine </input></p>
<p><input type="checkbox" name="dryer" value="dryer"/>Dryer </input></p>
<p><input type="checkbox" name="cooker" value="cooker"/>Cooker/Hob </input></p>
<p><input type="checkbox" name="fridge" value="fridge"/>Fridge Freezer </input></p>
<p><input type="checkbox" name="doubleglazing" value="doubleglazing"/>Double Glazing </input></p>
<p><input type="checkbox" name="heating" value="heating"/>Central Heating </input></p>
<p><input type="checkbox" name="alarm" value="alarm"/>Burglar Alarm </input></p>
<p><input type="checkbox" name="firealarm" value="firealarm"/>Fire Alarm </input></p>
<p><input type="checkbox" name="locks" value="locks"/>Locks on room doors </input></p>
<p><input type="checkbox" name="parking" value="parking"/>Off street parking </input></p>
<p><input type="checkbox" name="entrance" value="entrance"/>Buzz/Security door entrance </input></p>
<p><input type="checkbox" name="commonroon" value="commonroom"/>Communal living space (e.g living room) </input></p>
<p><input type="checkbox" name="bath" value="bath"/>Bath</input></p>
<p><input type="checkbox" name="shower" value="shower"/>Shower</input></p>
<p><br>How many bedrooms: <input type="text" name="beds" size="1" maxlength="1" value="<?php if (isset($_POST['beds'])) echo $_POST['beds']; ?>" /></br></p>
<p>Of those how many are double rooms: <input type="text" name="dbeds" size="1" maxlength="1" value="<?php if (isset($_POST['dbeds'])) echo $_POST['dbeds']; ?>" /></p>
<p><br>How much rent do you pay: £ <input type="text" name="rent" size="10" maxlength="20" value="<?php if (isset($_POST['rent'])) echo $_POST['rent']; ?>" /></br></p>
<p><br>Is the rent paid:<select name="rentpaid" id="rentpaid"></br></p>
<option value="weekly">Weekley</option> <---- option 1
<option value="monthly">Monthly </option> <---- option 2
</select>
<p><br>Please give a rating out of 5 for each of the following criteria (5 being the best):</br></p>
<p>Distance to university:<select name="distanceuni" id="distanceuni"></p>
<option value="1">1</option>
<option value="2">2 </option>
<option value="3">3</option>
<option value="4">4 </option>
<option value="5">5 </option>
</select>
<p>Distance to local shops:<select name="distanceshop" id="distanceshop"></p>
<option value="1">1</option>
<option value="2">2 </option>
<option value="3">3</option>
<option value="4">4 </option>
<option value="5">5 </option>
</select>
<p>Noise:<select name="noise" id="noise"></p>
<option value="1">1</option>
<option value="2">2 </option>
<option value="3">3</option>
<option value="4">4 </option>
<option value="5">5 </option>
</select>
<p>Safety:<select name="safety" id="safety"></p>
<option value="1">1</option>
<option value="2">2 </option>
<option value="3">3</option>
<option value="4">4 </option>
<option value="5">5 </option>
</select>
<p>Furniture and Fittings:<select name="fandf" id="fandf"></p>
<option value="1">1</option>
<option value="2">2 </option>
<option value="3">3</option>
<option value="4">4 </option>
<option value="5">5 </option>
</select>
<p>Community:<select name="community" id="community"></p>
<option value="1">1</option>
<option value="2">2 </option>
<option value="3">3</option>
<option value="4">4 </option>
<option value="5">5 </option>
</select>
<p><br><b>LANDLORD/ESTATE AGENT INFORMATION</b></br></p>
<p>Politeness:<select name="polite" id="polite"></p>
<option value="1">1</option>
<option value="2">2 </option>
<option value="3">3</option>
<option value="4">4 </option>
<option value="5">5 </option>
</select>
<p>Flexability:<select name="flexability" id="flexability"></p>
<option value="1">1</option>
<option value="2">2 </option>
<option value="3">3</option>
<option value="4">4 </option>
<option value="5">5 </option>
</select>
<p>Easy To Contact?:<select name="contact" id="contact"></p>
<option value="1">1</option>
<option value="2">2 </option>
<option value="3">3</option>
<option value="4">4 </option>
<option value="5">5 </option>
</select>
<p>Getting Jobs Done:<select name="jobdone" id="jobdone"></p>
<option value="1">1</option>
<option value="2">2 </option>
<option value="3">3</option>
<option value="4">4 </option>
<option value="5">5 </option>
</select>
<p>Comments or information you feel is important to pass on : <textarea rows="10" cols="30" name="comments" size="50" maxlength="255" value="<?php if (isset($_POST['comments'])) echo $_POST['comments']; ?>" </textarea></p>
<p><br><b>Please hit the submit button when finished.</b></br></p>
<p><input type="submit" name="submit" value="Submit" /></p>
<input type="hidden" name="submitted" value="TRUE" />
</form>
<!-- End of page-specific content. -->
<!-- Script 3.3 - footer.html -->
</div>
</div>
</div>
<div id="footer"><p>© Copyright 2009 by Christopher Brown & RateStudentSpace, Inc.</p></div>
</div><!-- End of "wrapper" DIV. -->
</body>
</html>
CSS:
div#wrap {max-width: 900px;
min-width: 700px;
width:90%;
margin:20% auto;
height:100%;
}
div#main {
background-image: url(file:///C|/p3t/phpfolder/images/contents.jpg);
width:809px;
height:809px;
margin-left:3%;
position:absolute; top:23.8%;
}
.info {
margin-bottom:2em;
margin-right:1em;
margin-left:1em;
font: 12px "Lucida Sans Unicode", Verdana, sans-serif;
}
div#header{
background-image: url(file:///C|/p3t/phpfolder/images/header.jpg);
width:809px;
height: 191px;
position: absolute;top:0%;
margin-left:3%;
}
div#home {
width:115px;
height:34px;
position: absolute;
top:190px;
margin-left:3%}
div#leave {
width:115px;
height:34px;
position: absolute;
top:190px;
margin-left:15%}
div#search {
width:115px;
height:34px;
position: absolute;
top:190px;
margin-left:27%}
div#help {
width:115px;
height:34px;
position: absolute;
top:190px;
margin-left:39.5%}
|
Advertisement
| Hall of Fame |