<?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></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);

// find out how many records there are to update
$size = count($_POST['hotelpkg_id']);
$size = count($_POST['package_id']);
//echo $size;

// start a loop in order to update each record
$i = 0;
while ($i < $size) {
// define each variable
$package_id= $_POST['package_id'][$i];
$hotel_id= $_POST['hotel_id'][$i];
$hotelpkg_id = $_POST['hotelpkg_id'][$i];

//echo $package_id . " " . $hotel_id . " " . $hotelpkg_id;
//die();
// do the update and print out some hotelegory just to provide some visual feedback
// you might need to remove the single quotes around the field names, for example bookhotelegory = '$bookhotel' instead of `bookhotel` = '$bookhotel'
$query = "UPDATE hotelpackagelink SET `package_id` = '$package_id', `hotel_id` = '$hotel_id' WHERE `hotelpkg_id` = '$hotelpkg_id' LIMIT 1";
mysql_query($query) or die ("Error in query: $query");
++$i;
}
mysql_close();
?>


<br><br>




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


</div>

</body>

</html>