Jump to content

Advanced search option.


ask9

Recommended Posts

Entirely depends on your database and HTML but a basic example is something along the lines of...

 

$sql = "
SELECT * FROM `table` 
WHERE `state`='". $_POST['state'] . "' 
AND `City` LIKE '%" . $_POST['city'] . "%' 
AND `gender`='" . $_POST['gender'] . "' 
AND `ethnicity`='" . $_POST['ethinicity'] . "'";

 

Age Range will depend on how you store the ranges in the dropdown and how you store the ages in the database, you might well have to set up a switch statement/if block. Interested in will also depend how it's kept in the database.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.