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.
I need a php script that u might have !
Moderator: General Moderators
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
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:
etc.
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']."'";
}