Unhandled Error!

Undefined variable: url

Document /modules/geoad/classes/geoad_module.php
Document type PHP document
Line 44
Exception class Phpr_PhpException

Code Highlight

      $clicks = Db_DbHelper::query("SELECT link FROM geoad_banners WHERE id = '$pieces[1]'");
      while ($link = mysql_fetch_assoc($clicks)) {
        $url= $link['link'];
      }
      $update_query_str = "UPDATE geoad_banners SET total_clicks = (total_clicks + 1) WHERE id ='$pieces[1]'";
      $ok = Db_DbHelper::query($update_query_str);
      header("Location: $url");
      //echo $url;
      //exit;
    }
 
    public static function get_advert($position=0, $limit=1) {
      if (!empty($position)) $extraQuery = " AND position_id = '$position'";
# Call Stack Code Document Line
10 GeoAd_Module->redirect_advert(array(1) [0 => '0bgw5KXy-34-DAjiAk5m']) /controllers/application.php 194
9 Application->find_access_point(()) /controllers/application.php 66
8 Application->On404(())
7 call_user_func_array(array(2) [0 => object(Application), 1 => 'On404'], array(0)) /phproad/modules/phpr/classes/phpr_controller.php 170
6 Phpr_Controller->executeAction('On404', array(0)) /phproad/modules/phpr/classes/phpr_controller.php 84
5 Phpr_Controller->_run('On404', array(0)) /phproad/modules/phpr/classes/phpr_response.php 64
4 Phpr_Response->open404(()) /phproad/modules/phpr/classes/phpr_response.php 37
3 Phpr_Response->open('/redirect/0bgw5KXy-34-DAjiAk5m') /phproad/system/phproad.php 31
2 include('/usr/www/users/cassgv/cass/phproad/system/phproad.php') /boot.php 114
1 require_once('/usr/www/users/cassgv/cass/boot.php') /index.php 3