/var/www/hkosl.com/chineseaaedu/_ajax.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?
include('webadmin/configure.php');
include(
'JSON.php');
$data $_POST;
$data['ajax'] = 'cheackUserName';
$data['username'] = 'benny';
if(@
$data['ajax']=='cheackUserName'){
    if(
$data['username']){
        
$sql "SELECT count(*) as count FROM member WHERE email = '".$data['email']."' and deleted = 0 ";
        
$sth1 $dbh->prepare($sql);
        
$sth1->execute();
        
$row_member $sth1->fetch(PDO::FETCH_ASSOC);
        
        
$json = new Services_JSON();
        if(
$row_member['count'] > 0){
            
$jsonReturnArr['status'] = false;    
        }else{
            
$jsonReturnArr['status'] = true;
        }
    }
    echo 
$json->encode($jsonReturnArr);
    exit();
}
?>