View Single Post
Old 08-21-2008, 07:44 AM   #2 (permalink)
Jim
The Addict
 
Jim's Avatar
 
Join Date: Nov 2007
Location: the Netherlands
Posts: 281
Thanks: 2
Jim is on a distinguished road
Default

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? =)
Send a message via MSN to Jim Send a message via Skype™ to Jim
Jim is offline  
Reply With Quote