<?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'; ?>

<h1>Moreno Travel Admin Portal</h1>
<?php

$package_id=$_GET['package_id']; 
require_once('connectvars.php');

	

$dbh = mysql_connect(hostname, username, password)

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

mysql_select_db (dbname, $dbh);


  if (isset($_GET['package_id'])) {
    // Grab the package data from the GET
    $package_id = $_GET['package_id'];
	$package_order = $_GET['package_order'];



  }
  else if (isset($_POST['package_id'])) {
    // Grab the package data from the POST
  $package_id = $_POST['package_id'];
$package_order = $_POST['package_order'];

	

 $query="UPDATE packages SET package_order='$package_order'
WHERE package_id=$package_id";
$result= mysql_query($query) or die(mysql_error());

        echo "<p>The package order for ".$package_name." was successfully edited.  Click <a href=\"admin_packageorder.php\">here</a> to edit the order further.";
    }
    else {
      echo '<p class="error">The package order was not edited.</p>';
    }
  
?>
</div>
<?php include 'footer.php'; ?>

</div>


</body>

</html>