Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiple selects

Status
Not open for further replies.

brk1221

MIS
Jan 29, 2002
230
US
Hi, I have an html form with 1 listbox. The "action=" points to a .php script. If a user chooses an option in the list box it will return the records with the selected criteria. I would like to add more listboxes to the form but I'm having trouble with the SELECT statement. The lone listbox is named "title" and the following is my select satement:

$sql = "SELECT * FROM contacts WHERE (title='$title')";

Any help would be appreciated

Thanks
 
When doing that, I select options from either listbox and it returns 0 records.

$sql = "SELECT * FROM contacts WHERE title='$title' AND mla_no='$mla_no'";

In the database there is a record where the "title" is
VP SAFETY and "mla_no" is 115 when I plug in those selections I'm getting 0 records.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top