Page 4 of 4

Posted: Wed Aug 11, 2004 10:33 am
by pickle
If no checkboxes are selected, then $condition_found shouldn't be true. Set it's initial value to false and that should be fixed.

Posted: Wed Aug 11, 2004 5:08 pm
by WLW
Yup, setting that to "false" fixed the issue.

Regarding the SQL not being picked up, do you think this Dreamweaver-generated code has anything to do with it?

Code: Select all

$category1_rs_members = "%";
if (isset($_GET['category1'])) {
  $category1_rs_members = (get_magic_quotes_gpc()) ? $_GET['category1'] : addslashes($_GET['category1']);
}
There is a list of these that appear near the top of the code on my page. There is one for each variable used on the form EXCEPT the variables that we are adding. What do you think??

Posted: Wed Aug 11, 2004 5:15 pm
by pickle
What do you mean by SQL not being picked up?

That code you showed does this:

Code: Select all

- Initializes $category1_rs_members to a value = "%",
- If there is a GET variable called "category1":
   - if get_magic_quotes_gpc() returns true, $category1_rs_members get's the value of the GET variable
    - otherwise $category1_rs_members gets the value of addslashes(the GET variable)

Posted: Wed Aug 11, 2004 7:53 pm
by WLW
Does that mean then that I need to add similar phrases for the 6 new items we are working with?

Regarding the SQL problem... Ignor that. I fixed it. The new chunk of PHP code was in the wrong place on the page.

Posted: Thu Aug 12, 2004 9:27 am
by pickle
I wouldn't think so - that line really only escapes escape characters if it needs to. The escape characters we're putting in the variables we make won't be an issue.

Posted: Thu Aug 12, 2004 9:31 am
by WLW
Thank you very much pickle and feyd!! All is working as expected now. Let me know if you'd like to see the sample. :D