![]() |
sponsored links |
|
|
sponsored links
|
|
|
7
16th March 18:54
External User
Posts: 1
|
The purpose for register_globals is for testing and functionality purposes
only. Every single example on the internet is for register_globals = on. I am very aware of the security risk of it. Get it working and then change it back. There is plenty of literature on how to edit existing working code once you disable it. Just working with the tools I have! As far as _tbl instead of table, I picked that one up in the military, just a preference. As far as the brackets, I tried with or without; price_range='[$select1]'"; price_range='$select1'"; price_range=select1"; All the same miserable error! Any suggestions on how to get select1 -> price_range= would truly be appreciated, and if your suggestion it more secure than what I am working with. This would be the icing on the cake! Brad -----Original Message----- From: Robert ***mings [mailto:robert@interjinn.com] Sent: Tuesday, June 12, 2007 12:38 PM To: BSumrall Cc: php-general@lists.php.net Subject: RE: [php] Looking for help with forms/variables and an array! BAD!!! BAD DOG!!! This is probably worse than register globals since it allows clobbering of variables AFTER you've defined any other local scope vars. Besides, it's redundant if you have register_globals on as you say above. But having register_globals is BAD! BAD DOG!! GO TO YOUR KENNEL! What's with the square brackets? Why haven't your escaped the $select value before using it in a query? Are you using the magic quotes GPC? If so... BAD!!! BAD DOG!! What the hell is lstng_tbl?? Or are you allergic to the readability enahcning properties of vowels? If so... BAD DOG!! BAAAAAAAD DOOOOG! Go play with traffic! Why do you post fix it with _tpl? Of course it's a friggin' table. Who's putting in the variables? you or your visitors? *lol* $query = "SELECT " ." * " ."FROM " ." listing " ."WHERE " ." price_range = '".mysql_real_escape_string( $_POST['select1'] )."' "; Cheers, Rob. Ps. BAD DOG!! ![]() -- ..------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------' |
|
|
8
16th March 18:54
External User
Posts: 1
|
It doesn't like the curly brackets either!
Brad -----Original Message----- From: Jim Lucas [mailto:lists@cmsws.com] Sent: Tuesday, June 12, 2007 12:39 PM To: BSumrall Cc: php-general@lists.php.net Subject: Re: [php] Looking for help with forms/variables and an array! $query_Recordset1 = "SELECT * FROM lstng_tbl WHERE price_range = '[$select1]'"; Why do you have brackets in this statement? Are they actually in the data that way? Try this, curly braces: $query_Recordset1 = "SELECT * FROM lstng_tbl WHERE price_range = '{$select1}'"; -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|