Exec($sql); echo mysql_insert_id(); } } if ($task == 'editPoint') { $array['itemid'] = Tools_Http::Post('itemid', true); $array['name'] = $DB->Escape(Tools_Http::Post('name')); $array['address'] = $DB->Escape(Tools_Http::Post('address')); $array['information'] = $DB->Escape(Tools_Http::Post('information')); $array['city_id'] = Tools_Http::Post('city_id', true); $errors = array(); if (sizeof($errors)) { ?> 0) $result = $points -> updatePoint ($array['itemid'],$array); else $result = $points -> insertPoint ($array); ?> Escape(Tools_Http::Post('name')); $errors = array(); if (sizeof($errors)) { ?> 0) $result = $points -> updateCity ($array['itemid'],$array); else $result = $points -> addCity ($array); ?>