php - Variables undefined error in latest version of localhost (vertrigo_230) -


below mentioned php code perfect on vertrigo_222 (and on livehost).
now trying upgrade localhost vertrigo_230.
i facing following undefined variable error or warning: enter image description here here code (line # 30 mentioned):

<?php ob_start(); session_start(); include_once("php_code/db_connection.php"); if(isset($_request['data']))     $data = $_request['data'];  //fetch important information database in variables if($_session['id'] && $_session['pw'])  //login must informatiion {     if(isset($_request['city_id']))     {         if($_request['city_id'])         {             $city_id = $_request['city_id'];         }         else         {             $query = "select * cities user_id = '$_session[id]'";             $c = mysql_query($query) or die(mysql_error()." in query $query");             $city = mysql_fetch_array($c);             $city_id = $city['city_id'];         }         //setting current/opened city in session         $_session['city_id'] = $city_id;     } }  //secure page if($data == "")                   //line # 30     $data = "loginpage"; 

please give me solution.

define $data global variable , have use mysqli insted because mysql officially deprecated

  ob_start(); session_start(); include_once("php_code/db_connection.php"); $data = ''; //your code 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -