Below mentioned PHP code was perfect on vertrigo_222 (and also on livehost).
Now I am trying to upgrade my localhost to vertrigo_230.
I am facing following undefined variable error or warning:
Here is code (line # 30 is mentioned):
<?php
ob_start();
session_start();
include_once("PHP_Code/db_connection.php");
if(isset($_REQUEST['data']))
$data = $_REQUEST['data'];
//Fetch All Important Information from Database in Variables
if($_SESSION['id'] && $_SESSION['pw']) //Login Must for This Informatiion
{
if(isset($_REQUEST['city_id']))
{
if($_REQUEST['city_id'])
{
$city_id = $_REQUEST['city_id'];
}
else
{
$query = "SELECT * FROM cities WHERE 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 some solution.