<?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" />

<style>

tr.order { border-bottom: 1px solid }</style

</head>




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

<h1>Moreno Travel Admin Portal</h1>


<ul>



<p>Thank you for updating.</p>



<?php
require_once('connectvars.php');

$dbh = mysql_connect(hostname, username, password)

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

mysql_select_db (dbname, $dbh);

$size = count($_POST['location_name']);

$i = 0;

while ($i < $size) {

$location_id = $_POST['location_id'][$i];
$location_name = $_POST['location_name'][$i];
$location_order = $_POST['location_order'][$i];
$location_pic = $_POST['location_pic'][$i];
$location_map = $_POST['location_map'][$i];


$query = "UPDATE location SET `location_name` = '$location_name', `location_order` = '$location_order', `location_pic` = '$location_pic', `location_map` = '$location_map' WHERE `location_id` = '$location_id' LIMIT 1";
mysql_query($query) or die ("Error in query: $query");
++$i;
}
mysql_close();
?>


<br><br>




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



</body>

</html>