<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Verify_email extends CI_Controller {
	/**
	 * Index Page for this controller.
	 *
	 * Maps to the following URL
	 * 		http://example.com/index.php/Welcome
	 *	- or -
	 * 		http://example.com/index.php/Welcome/index
	 *	- or -
	 * Since this controller is set as the default controller in
	 * config/routes.php, it's displayed at http://example.com/
	 *
	 * So any other public methods not prefixed with an underscore will
	 * map to /index.php/Welcome/<method_name>
	 * @see http://codeigniter.com/user_guide/general/urls.html
	 */
	public function __construct() {
		parent::__construct();
		
 	}
 	
 	public function index(){
 	  //  echo "called";
 	}
	public function verify($req_id=null){
	   if($this->db->where('req_id',$req_id)->get("users")->num_rows()>0){
	        $this->db->where('req_id',$req_id)->update("users",array("email_is_verified"=>1,"req_id"=>""));
	        echo "Verification Successfully";
	    } else {
	            echo "Invalid Verification code";
	    }
	}
// 		public function verify_get($req_id=null){
	 
	    
// 	}
}