<?php
	require_once ('authorize1.php');
?>
<!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" lang="en-US">

<head>
<title>Moreno Travel</title>
<script src="sorttable.js"></script>
    <link href="style.css" rel="stylesheet" type="text/css" />
    <meta http-equiv="content-type"
        content="text/html; charset=utf-8" />


<?php include 'admin_header.php'; ?>

<h1>Add Hotel</h1>





<form method="post" action="admin_addhotelscript.php">
<select name='location_id'>
<option disabled=\"disabled\" selected=\"selected\">Select a location:</option> 
<?php

require_once('connectvars.php');
	

$dbh = mysql_connect(hostname, username, password)

	or die("Unable to connect to MySQL");

mysql_select_db (dbname, $dbh);

	$query = sprintf("SELECT * FROM location ");




	$result = mysql_query($query);


	if (!$result) {

    	$message  = 'Invalid query: ' . mysql_error() . "\n";

    	$message .= 'Whole query: ' . $query;

    	die($message);

	}


while ($row = mysql_fetch_assoc($result)) {
	



echo '<option value="'.$row['location_id'].'">'.$row['location_name'].'</option>';

	}	
?>


</select><br><br>
<strong>Rating:</strong>
<br><select name="saleitem">
<option disabled=\"disabled\" selected=\"selected\">Select a rating:</option> 
<option value="0">unknown</option>
<option value="1">1 star</option>
<option value="2">2 star</option>
<option value="3">3 star</option>
<option value="4">4 star</option>
<option value="5">5 star</option>
<option value="boutique">boutique</option>
<option value="tesoros">tesoros de Mexico</option>
<option value="b&b">bed & breakfast</option>


</select><br><br>




<strong>Hotel Name:</strong><br> <input size="100" type="text" name="hotel_name"  /><br><br>
<strong>Phone:</strong><br> <input type="text" name="hotel_phone"  /> <i><font color="#C11B17" size="0.5px">ie: +XX (XXX) XXX XXXX</font><br><br>
<strong>Address:</strong><br> <input size="100" type="text" name="hotel_address"  /><br>
<strong>City:</strong> <input type="text" name="hotel_city"  />
<strong>State:</strong> <input type="text" name="hotel_state" v />
<strong>Country:</strong> <input type="text" name="hotel_country"  /><br><br><br><br>
<strong>Features:</strong><br> <textarea cols="110" rows="10" name="hotel_features"></textarea><br><br>
<strong>Green Hotel (if this hotel is green, describe it):</strong><br> <textarea cols="110" rows="10" name="hotel_green"></textarea><br><br>
<strong>Picture:</strong><br><input type="text" size="25" name="hotel_pic" /><br><i><font color="#C11B17" size="0.5px">Enter the name of the file.  Click <a href="admin_hotelpicturelist.php" target="blank">here</a> to see a list of pictures with filenames.  Click <a href="admin_hoteluploadimage.php" target="blank">here</a> to upload a new picture.<br><br><br><br><br>


<input type="submit" value="Submit">
</form>
  





</ul><br><br><br>
</div>


</div>

</body>

</html>