-----Original Message----- From: BSumrall [mailto:Brads@xxxxxxxxx] Sent: Tuesday, June 12, 2007 7:52 PM To: 'ceo@xxxxxxxxx' Subject: RE: Looking for help with forms/variables and an array! Don't be a hater! :o) I know I am a newbie for flat out application programming. I am used to just tweaking! Lately I have been asked to pull the stuff out of the air, so looking to the mailing list to help guide me. I have read all the books, but that does not mean anything till you are in the weeds! Basically all I am trying to accomplish is 2 separate SQL query filter -> first (from a db of 1000 records) get the houses from $state -> second, from that query, get the ones of $value_range -> third, display them and there info one at a time I am getting my but handed to me on $state right now I can pull them all up at once or just one! Brad -----Original Message----- From: Richard Lynch [mailto:ceo@xxxxxxxxx] Sent: Tuesday, June 12, 2007 4:13 PM To: BSumrall Cc: 'Robert Cummings'; php-general@xxxxxxxxxxxxx Subject: RE: Looking for help with forms/variables and an array! On Tue, June 12, 2007 12:02 pm, BSumrall wrote: > Every single example on the internet is for register_globals = on. Actually, this is not at all true. And, really, fixing the example before you run it to not need register_globals is the way to go. > As far as the brackets, I tried with or without; > price_range='[$select1]'"; > price_range='$select1'"; > price_range=select1"; > > All the same miserable error! Not EXACTLY the same miserable error. You're still writing invalid SQL, but it's invalid in different ways each time. echo out your query, and see how it looks, and compare it to how the query should look. echo $query_Recordset1; PS extract($_POST) is just as bad as register_globals, so don't do that. Maybe you want something more like: $price_minimum = (int) $_POST['select1']; $price_maximum = (int) $_POST['select2']; $price_minimum_sql = mysql_real_escape_string($price_minimum); $price_maximum_sql = mysql_real_escape_string($price_maximum); $query = "select * from whatever where price >= $price_minimum_sql and price <= $price_maximum_sql"; Though it looks like you've set up price "brackets" so maybe it won't be quite like that... Still it's closer than what you have now. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php