Validation with ajax Controller File


/*** Create a file in Controllers name validation_username ******/

class Validation_username extends CI_Controller
    {
        function check_email_availablity()
        {
        if($_REQUEST)
            {
                $username     = $_REQUEST['username'];
                $query = $this -> db -> get_where ('personal_info', array('user_name' => $username));
              
                if($query -> num_rows() > 0) // not available
                {
                    /**** echo this -->Create a div id name Error*****/
                }
                else
                {
                    /**** echo this --> Create a div id name Success ***/
                }
              
            }

        }
    }

Comments

Popular posts from this blog

371 - Ackermann Functions

Create many folder with one click