Page 1 of 1
I need a php script that u might have !
Posted: Wed May 26, 2004 9:31 am
by taghiti
I need a php script of searching in a database by 6 criterias, if you got one or have an idea how to do it, please reply.
Thank you in advance.
Posted: Wed May 26, 2004 10:05 am
by kettle_drum
Fairly simple to write your own, make your html form, get it to post to the php page, have this page construct the query that searches the database:
Code: Select all
$sql = "SELECT * FROM blah WHERE active = '1'"
if(isset($_GET['title'])){
$sql .= " AND title = '".$_GET['title']."'";
}
if(isset($_GET['author'])){
$sql .= " AND author = '".$_GET['author']."'";
}
etc.