Right the code below selects staff members from the database by the column gp(group) which enables me to select all or filter down by their group, but i need certain members to appear in more than one group
any ideas would be much appreciated
<form name="staff" action="staffs.php" method="POST">
<select name="staff" class="drop_menu">
<option value="%">All</option>
<option value="2">Directors</option>
<option value="3">UK Sales</option>
<option value="4">Export Sales</option>
<option value="5">Technical</option>
<option value="6">Marketing</option>
<option value="7">Purchasing</option>
<option value="8">Accounts</option>
<option value="9">Warehouse</option>
</select>
<input type="submit" value="Show" />
</form>
<?php
include(connection details);
?>
<?php
$var = $_POST['staff'] ;
//connect to mysql
$connection = mysql_connect($host,$account,$password)
or die ("Couldn't connect to server");
//select which database you want to edit
$db = mysql_select_db("test",$connection)
or die ("Couldn't connect to database");
// Build SQL Query
$string = ("select * from staff where gp like \"%$var\" ORDER BY ord "); // SQL query
$query = mysql_query($string) or die (mysql_error());
$row_Recordset1 = mysql_fetch_array($query); //The Recordset array
?>