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



</head>


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

<h1>Edit Attraction</h1>

<?php

$press_id=$_GET['press_id']; 

require_once('connectvars.php');

	

$dbh = mysql_connect(hostname, username, password)

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

mysql_select_db (dbname, $dbh);


$query = "SELECT * FROM press 
WHERE press_id = $press_id";
$result= mysql_query($query) or die(mysql_error());
$row = mysql_fetch_array ($result) or die(mysql_error());


    echo '<p><strong>Press ID: </strong>'.$press_id.' - Please edit as required.</p>'; 
       echo '<form method="post" action="admin_editpressscript.php">';
echo '<input type="hidden" name="press_id" value="'. $row['press_id'].'">';
echo '<strong>Headline:</strong><br>'.'&nbsp;'.'<input size="100" type="text" name="press_headline" value="'.$row['press_headline'].'" /><br><br><br><br>';
echo '<strong>Date:</strong><br>'.'&nbsp;'.'<input size="100" type="text" name="press_date" value="'.$row['press_date'].'" /><br>
<br>
<i><font color="#C11B17" size="0.5px">Enter as YYYY-MM-DD</font></i>.
<br><br><br><br>';
echo '<strong>Source:</strong><br>'.'&nbsp;'.'<input size="100" type="text" name="press_source" value="'.$row['press_source'].'" /><br><br>';
echo '<strong>Details:</strong><br>'.'&nbsp;'.'<textarea cols="110" rows="10" name="press_details">'.$row['press_details'].'</textarea><br><br>';
echo '<strong>Picture:</strong><br><input type="text" size="25" name="press_pic" value="'.$row['press_pic'].'" /><br>
<i><font color="#C11B17" size="0.5px">Enter the name of the file.  Click <a href="admin_presspicturelist.php" target="blank">here</a> to see a list of pictures with filenames.  Click <a href="admin_pressuploadimage.php" target="blank">here</a> to upload a new picture.
<br><br><img width="182px" height="158px" src="pressimg/'.$row['press_pic'].'"><br><br>';

  echo '<input type="submit" value="Submit">';
	echo '</form>';
  
 

?>


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


</div>

</body>

</html>