I have a table containing members of a boy's choir. There are 4 types of claases within the choir. My PHP script lists the members fine. I have a field that I want to use to filter the list by whatever choir type the user selects. I fill the dropdown dynamically from a table of choir types. Ideally when the user selects a choir type I would automatically call the same script and pass the selection as a variable in the URL. I use <? echo StripSlashes($line5[memChoir]); ?> as the variable to pass since that is the value I see in the dropdown. Here is the code I'm using for the drop down:
<? $where="memberlist.php?where"; ?>
//this is at the top of the script
<td width="43%" align="left" size="15" valign="baseline">for Choir <select size="1" name="selchoir" tabindex="1"
onchange="window.location = $where .<? echo StripSlashes($line5[memChoir]); ?>">
<option selected><? echo StripSlashes($line5[memChoir]); ?></option>
<?php
$query = "SELECT Value FROM tblTableV where Name='CHOIR' order by Value";
$result5 = mysql_query($query);
while ($line5 = mysql_fetch_array($result5))
{
?>
<option><? echo StripSlashes($line5[Value]); ?></option>
<?
}
mysql_close($link);
?>
</select></td>
When I select a drop down value the page does not call itself. I know it's probably a simple syntax error but I am at my wits end. As always, thanks in advance for your help.
Scott
<? $where="memberlist.php?where"; ?>
//this is at the top of the script
<td width="43%" align="left" size="15" valign="baseline">for Choir <select size="1" name="selchoir" tabindex="1"
onchange="window.location = $where .<? echo StripSlashes($line5[memChoir]); ?>">
<option selected><? echo StripSlashes($line5[memChoir]); ?></option>
<?php
$query = "SELECT Value FROM tblTableV where Name='CHOIR' order by Value";
$result5 = mysql_query($query);
while ($line5 = mysql_fetch_array($result5))
{
?>
<option><? echo StripSlashes($line5[Value]); ?></option>
<?
}
mysql_close($link);
?>
</select></td>
When I select a drop down value the page does not call itself. I know it's probably a simple syntax error but I am at my wits end. As always, thanks in advance for your help.
Scott