<?php session_start(); if(isset($_SESSION["MOBILE"])){ $data = 1; }else{ $data=0; } echo json_encode($data); ?>