<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of checkEmail
 *
 * @author admin@3embed
 */
require_once 'ConDB.php';

class checkUserID {
    public $available;
    public $userName;
    public $userEmail;
    public $userPhone;
    
    public function __construct($userid) {
        $db = new ConDB();
        $get_user_qry = "select * from user where id = '".$userid."'";
        $user_res = mysql_query($get_user_qry, $db->conn);
        if(mysql_num_rows($user_res) > 0){
            $row = mysql_fetch_assoc($user_res);
            
            $this->available = true;
            $this->userName = $row['UserName'];
            $this->userEmail = $row['Email'];
            $this->userPhone = $row['Phone'];
            
        }else{
            $this->available = false;
        }
        
        //$db->close($db);
    }
    
}

?>

