I need some assistance with creating a dropmenu that pulls a database field and displays the rest of information underneath it so i can print it. I am only having issues with after selecting the info in the field, the information doesn't change.
<?php
mysql_connect('host', 'user', 'password');
mysql_select_db('databasename');
$sql = "SELECT * FROM table1";
$result = mysql_query($sql);
echo "<form name='filterform' method='POST' action='test.php'>";
echo "<select name='filter' id='filter' onchange='this.form.submit();'>";
while ($row = mysql_fetch_array($result)) {
echo "<option value='" . $row['created_time'] ."'>" . $row['created_time'] ."</option>";
}
echo "</select>";
echo "</form>";
?>
<?php
$Search = isset($_REQUEST['filter']);
$query = "SELECT * FROM table1 WHERE created_time='$Search'";
$res = mysql_query($query);
while ($info = mysql_fetch_assoc($res)) {
echo "<h4>End of Day Report</h4>";
echo "Date Created:", " ". $info['created_time'];
echo "<BR>";
echo "Orders Total:", " ". $info['order_total'];
}
?>