<?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.  </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['staff_id']);

// start a loop in order to update each record
$i = 0;
while ($i < $size) {
// define each variable
$staff_id= $_POST['staff_id'][$i];
$staff_firstname= $_POST['staff_firstname'][$i];
$staff_lastname = $_POST['staff_lastname'][$i];
$title = $_POST['title'][$i];
$contact = $_POST['contact'][$i];
$staff_picture = $_POST['staff_picture'][$i];
$details = $_POST['details'][$i];

// do the update and print out some info just to provide some visual feedback
// you might need to remove the single quotes around the field names, for example bookinfo = '$bookinfo' instead of `bookinfo` = '$bookinfo'
$query = "UPDATE staff SET staff_firstname='$staff_firstname', staff_lastname='$staff_lastname', title='$title', contact='$contact', staff_picture='$staff_picture', details='$details' WHERE staff_id='$staff_id' LIMIT 1";
mysql_query($query) or die ("Error in query: $query");
++$i;
}
mysql_close();
?>







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

<?php include 'footer.php'; ?>
</div>

</body>

</html>