I am trying to create a plan for users based on their top 3 choices. I want to display results all together on a results page. I have database populated and form (check boxes) created. I cannot seem to put the two together. I want them to choose 3 choices and upon submission return results based on those choices. please advise. (please note this is not to populate data in a database but to retrieve data from based on user section)
jesikatt04
0
Newbie Poster
Recommended Answers
Jump to PostIt's probably how you are building your query that's the problem.
You have to start with a basic query, then for each checkbox that is checked, add the appropriate bit to the end of the query, then finally pass that to your database.
so, something like this perhaps
…
Jump to PostIn the SQL statement above, the three items are there, but it is set up to only return ONE item. If you change the OR to AND, or just use commas, since you want all three, you should get the info you need.
Tom
All 7 Replies
genevish
-2
Junior Poster in Training
jesikatt04
0
Newbie Poster
genevish
-2
Junior Poster in Training
drjohn
56
Posting Pro in Training
tom.in.wvc
0
Newbie Poster
jesikatt04
0
Newbie Poster
tyson.crouch
6
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.