require('../includes/application_top.php'); $cat_id = $_GET['cat_id']; $email_address = trim($_POST['email_address']); $password = trim($_POST['password']); if(isset($_POST['action']) && $_POST['action']=="Login"){ $sql_select = "SELECT * FROM tbl_customers WHERE emailid='$email_address' AND pwd='$password' and status='1'"; $result = mysql_query($sql_select) or die(DB_QUERY_ERROR); if(mysql_num_rows($result) == 0){ $msg = "Invalid email address or password. Try again."; }else{ $rows_result = mysql_fetch_array($result); $_SESSION['sess_customers_id'] = $rows_result['customers_id']; $_SESSION['sess_email_address'] = $rows_result['emailid']; $_SESSION['sess_customers_name'] = $rows_result['name']; if(isset($cat_id)){ $url = DIR_FS_CATALOG."member/post-classified.php?cat_id=$cat_id"; }else{ $url = DIR_FS_CATALOG."member/user-account.php"; } mysql_free_result($result); header("Location: $url"); exit; } } ?>
|
$sql_city="SELECT * FROM tbl_location_area where parent_id != 0 or name='Delhi & NCR' order by popular DESC, name";
$result_city = mysql_query($sql_city);
while($rows_city= mysql_fetch_array($result_city))
{
$city_name[] = $rows_city['name'];
$location_area_id[] = $rows_city['location_area_id'];
$popular[]=$rows_city['popular'];
}
if(is_array($city_name)){
$city_name=implode('" , "',$city_name);
}
if(is_array($popular)){
$popular=implode('" , "',$popular);
}
if(is_array($location_area_id)){
$location_area_id=implode('" , "',$location_area_id);
}
?>
|
|