I use this code to search for specific values in my database
Code: Select all
foreach($HTTP_POST_VARS as $varname => $value)
$formVars[$varname]=$value;
$query = "SELECT
salutation,name,surname,organisation,email,address,address1,
telephonefax,mobile,mscints,mscactive,gradjobs,ugproj,pdev,bcsmem,bcspds,teach,acconsult,person_id
FROM feedbackcontacts
WHERE mscactive = '$formVars[mscactive]yes'";
$result = mysql_query($query);I.e where BCSmembership and BCSPDS = 'yes'
In other words when a user selects submit, the query searches mscactive, bcsmem, bcspds for the value 'yes' as is currently done above.