From c0e4bc4298e83b952a50f87cbf30b11eed6691dd Mon Sep 17 00:00:00 2001 From: root Date: Sun, 31 Aug 2008 20:25:06 +0000 Subject: [PATCH] Improved register_globals --- pages/wot/13.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/wot/13.php b/pages/wot/13.php index 896bc60..eac7e18 100644 --- a/pages/wot/13.php +++ b/pages/wot/13.php @@ -22,8 +22,8 @@ if(array_key_exists('location',$_REQUEST) && $_REQUEST['location'] != "") { $bits = explode(",", $_REQUEST['location']); $loc = trim(mysql_escape_string($bits['0'])); - $reg = trim(mysql_escape_string($bits['1'])); - $ccname = trim(mysql_escape_string($bits['2'])); + $reg = ''; if(array_key_exists('1',$bits)) $reg=trim(mysql_escape_string($bits['1'])); + $ccname = ''; if(array_key_exists('2',$bits)) $ccname=trim(mysql_escape_string($bits['2'])); $query = "select `locations`.`id` as `locid` from `locations`, `regions`, `countries` where `locations`.`name` like '$loc%' and `regions`.`name` like '$reg%' and `countries`.`name` like '$ccname%' and `locations`.`regid`=`regions`.`id` and `locations`.`ccid`=`countries`.`id`