I'm pretty confused here man...
You have a loop that just assigns a different value to $City everytime it goes through, and then you manuappy print out the results that should be generated dynamically from the query...
let's clean this up a little bit more...
we really don't need all those table statements...
also, code notations should mroe describe the process than define PHP functions
<form name="submitform" action="tool_broadcast_email2.php">
<select name="send2Menu">
<option value="all">Whole Group</option>
<?PHP
$conn = db_connect();
//pull canadian cities from the demographics table
$query = "SELECT DISTINCT city FROM demographics WHERE country='Canada' ORDER BY city";
// output select options from given DB results
// also populate the $City array with the data as well
$result = mysql_query($query);
$City = array();
while ($row=mysql_fetch_array($result))
{
$City[] = $row[city];
print "<option value='$row[city]'>$row[city]</option>\n";
}
print "<option value=''>=====================</option>
<option value='Canada'>Canada</option>
<option value='England'>England</option>
<option value='United States'>United States</option>
<option value=''>=====================</option>
<option value='Active'>Active</option>
<option value='Associate'>Associate</option>
<option value='Honorary'>Honorary</option>
<option value='Institution'>Institution</option>
<option value='Life'>Life</option>
<option value='Student'>Student</option>
</select>\n";
print "<textarea name='Subject' cols='50' rows='1' wrap='VIRTUAL'></textarea>\n";
print "<textarea name='Body' cols='100' rows='30' wrap='VIRTUAL'></textarea>\n";
print "<input type='submit' name='Submit' value='Send E-mail'>\n";
print "<input type='submit' name='Submit' value='Save Draft'>\n";
print "<input type='reset' name='Reset' value='New'>\n";
?>
now, in the next script, are you making sure you are calling the variables correctly?
$City and $city are considered two different variables in PHP - everything is CaSe SeNsItIvE
as for determining what submit button they pressed:
// notice that I changed both submit buttons to be named 'Submit'
if (isset($Submit) && $Submit == "Send E-mail")
{
// code for sending email
}
elseif (isset($Submit) && $Submit == "Save Draft")
{
// code for Draft Saving
}
// if you end up having more than two submit buttons, you could go this route:
switch ($Submit)
{
case "Send E-mail":
// code for sending email
break;
case "Save Draft":
// case for Saving Draft
break;
}
lemme know if any of this hits the nail on the head...
-=Lazz=-