I need to have a drop down menu that pulls its options from a column in my db (event) and have it display the summary of the event.
Below is the code I have to display the summary. Currently it displays the summary for all of the events in my db. What can I modify in the code where it will only display the summary of the event name selected from the drop down menu? I greatly appreciate any assistance.
<?php
/ Connecting, selecting database /
$link = mysql_connect("localhost", "csparker_aol", "370532")
or die("Could not connect");
#print "Connected successfully";
mysql_select_db("csparker_meetingform") or die("Could not select database");
$results=mysql_query ("SELECT * FROM events ORDER BY event");
while ($row=mysql_fetch_array($results)){
$event = $row["event"];
$date = $row["date"];
$venue = $row["venue"];
$street = $row["street"];
$city = $row["city"];
$state = $row["state"];
$zip = $row["zip"];
$phone = $row["phone"];
$fax = $row["fax"];
$contacts = $row["contacts"];
$transportation = $row["transportation"];
$checkin = $row["checkin"];
$billing = $row["billing"];
$agenda = $row["agenda"];
$office = $row["office"];
$cod = $row["memberid"];
if($event="")
{
$display_event_summary .="
<center><p><font size=4><b>$event</b></font></center>
<br><b>Date: </b>$date
<br><b>Venue: </b>$venue
<br><b>Address: </b><br>$street
<br>$city, $state $zip
<br><b>Phone: </b>$phone
<br><b>Fax: </b>$fax
<br><b>Onsite Contacts: </b>$contacts
<br><b>Preliminary Agenda: </b>$agenda
<br><b>Transportation: </b>$transportation
<br><b>Check-In Procedures: </b>$checkin
<br><b>Billing: </b>$billing
<br><b>Office - The Directors Room: </b>$office";
}
;
}
?>
<? echo "$display_event_summary"; ?>