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
Post a Comment