0 and $user_longitude<>0){ $sql=mysql_query("update gcm set notification_eqn=$n_e,notification_manual=$n_m,notification_official=$n_o,notification_near=$n_o_near,notification_official_csi=$n_o_csi,notification_official_emsc=$n_o_emsc,notification_official_funvisis=$n_o_funvisis,notification_official_geonet=$n_o_geonet,notification_official_guc=$n_o_guc,notification_official_ign=$n_o_ign,notification_official_igepn=$n_o_igepn,notification_official_ineter=$n_o_ineter,notification_official_ingv=$n_o_ingv,notification_official_inpres=$n_o_inpres,notification_official_jma=$n_o_jma,notification_official_phivolcs=$n_o_phivolcs,notification_official_rsn=$n_o_rsn,notification_official_sgc=$n_o_sgc,notification_official_ssn=$n_o_ssn,notification_official_usgs=$n_o_usgs,notification_official_minmag='$n_o_mag',last_latitude=$user_latitude,last_longitude=$user_longitude where user_id=$user_id"); } else{ $sql=mysql_query("update gcm set notification_eqn=$n_e,notification_manual=$n_m,notification_official=$n_o,notification_near=$n_o_near,notification_official_csi=$n_o_csi,notification_official_emsc=$n_o_emsc,notification_official_funvisis=$n_o_funvisis,notification_official_geonet=$n_o_geonet,notification_official_guc=$n_o_guc,notification_official_ign=$n_o_ign,notification_official_igepn=$n_o_igepn,notification_official_ineter=$n_o_ineter,notification_official_ingv=$n_o_ingv,notification_official_inpres=$n_o_inpres,notification_official_jma=$n_o_jma,notification_official_phivolcs=$n_o_phivolcs,notification_official_rsn=$n_o_rsn,notification_official_sgc=$n_o_sgc,notification_official_ssn=$n_o_ssn,notification_official_usgs=$n_o_usgs,notification_official_minmag='$n_o_mag' where user_id=$user_id"); } if ($sql === TRUE) { print("ok"); } else{ print("nok"); } mysql_close(); ?>