08-21-2008, 07:44 AM
|
#2 (permalink)
|
|
The Addict
Join Date: Nov 2007
Location: the Netherlands
Posts: 281
Thanks: 2
|
PHP Code:
$searchTypes = array('club_name', 'last_name'); // etc etc
if(in_array($_POST['searchType'], $searchTypes))
{
$sql = "SELECT * FROM club WHERE ".$_POST['searchType']." like
'%$query%' ORDER BY club.club_name ASC";
$result = mysql_query($sql) or die(mysql_error());
}
else
{
trow new Exception('zOMG no seachtype found!');
}
Something like this should work :)
__________________
Nunchaku! Who doesn't like martial arts? =)
|
|
|