<?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>
    <link href="style.css" rel="stylesheet" type="text/css" />
    <meta http-equiv="content-type"
        content="text/html; charset=utf-8" />
</head>


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



<p>Thank you for updating.  To update the order again, click <a href="http://newbirdmedia.com/admin_packageorder.php">here</a>.</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['package_id']);

$i = 0;
while ($i < $size) {

$package_id= $_POST['package_id'][$i];
$package_order= $_POST['package_order'][$i];


$query = "UPDATE packages SET package_order='$package_order' WHERE package_id='$package_id' LIMIT 1";
mysql_query($query) or die ("Error in query: $query");
++$i;
}
mysql_close();
?>
</div>


</div>


</body>

</html>