logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > PHP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 05-05-2009, 08:20 AM   #1
Hemangi
 
Join Date: May 2009
Location: Perth, Australia
Posts: 3
Default How to add checkboxes to refine search database

HI,

I have web site where user should search by multiple parameters, text field and checkboxes. I have made the keyword search just searching my database table rows for word that matches input URL parameter from the text field.
But I need to add to this form checkboxes which will refine the search. For example they can search for brick pavers in the text field and then check Search in North of the river, South of the river and so on areas. Can anyone please help me with the code. What do I need to write in the form code to pass the values of the checkboxes and how to set up this advanced recordset to display results based on both keyword and/or selected checkboxes.
Thanks in advance to whoever can help me.

Regards,
Hemangi
Hemangi is offline   Reply With Quote
Old 05-05-2009, 08:50 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,170
Default

when you saty recordset , is this an indication that you are using DW to code your query?
what databse are you using.
a hint that may help you is && is AND, || is OR
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 05-05-2009, 09:14 AM   #3
Hemangi
 
Join Date: May 2009
Location: Perth, Australia
Posts: 3
Default

I am using Dreamweaver with PHP and MySQL, I tried adding a second variable to the recordset(which to hold information from the checkboxes) and using it with AND and OR statement in the advanced recordset panel but it returned speling SQL error and on top of that creates completely new variable called $totalRows , and deletes the run time value of one of my variables. I tried several things like using AND and then OR in the statment but it was frustrating because it won't let me even preview it because no mater how many times I delete this $totalRows it still came and deletes run time value of the other var, so it is like magic circle. Ones this started all my errors were based on "run time value missing" or something of this kind. Any clues....?
Hemangi is offline   Reply With Quote
Old 05-05-2009, 09:55 AM   #4
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,170
Default

yes walk away form DW code and write yur own. Im sorry to ay but DW code is good for what it does but stray from its bags of tricks and it gets confusing. check out the tutorials on this site, it will help you
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 05-05-2009, 10:06 AM   #5
Hemangi
 
Join Date: May 2009
Location: Perth, Australia
Posts: 3
Default

What site? Maybe you forgot to put the link. I am just a designer and now came a task involving code which is difficult for me.
Hemangi is offline   Reply With Quote
Old 05-05-2009, 01:07 PM   #6
Corrosive
Corrosive's Avatar
 
Join Date: Feb 2008
Location: Bristol, England
Posts: 7,103
Default

Quote:
Originally Posted by Hemangi View Post
What site? Maybe you forgot to put the link. I am just a designer and now came a task involving code which is difficult for me.
On this site... as in 'Dreamweaver Club'.
Corrosive is offline   Reply With Quote
Old 05-05-2009, 02:04 PM   #7
davidj
davidj's Avatar
 
Join Date: Sep 2005
Location: The Toon (newcastle upon Tyne)
Posts: 8,256
Default

Quote:
What site? Maybe you forgot to put the link
http://www.dreamweaverclub.com/vtm/php-mysql-apache.php

Quote:
Day 12 and I think I may have a touch of Swine Flu!
did you come out in rashers?
__________________
Would you like to learn PHP from me? Check out -> www.codezenith.co.uk
davidj is offline   Reply With Quote
Old 05-05-2009, 02:46 PM   #8
Corrosive
Corrosive's Avatar
 
Join Date: Feb 2008
Location: Bristol, England
Posts: 7,103
Default

Quote:
Originally Posted by davidj View Post
did you come out in rashers?
I'd hate to think you weren't taking this seriously DJ
Corrosive is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:30 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com