Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Created by PhpStorm.
- * User: trust2
- * Date: 19/09/19
- * Time: 09.37
- */
- class User extends CI_Controller
- {
- public function __construct()
- {
- parent::__construct();
- $this->load->model("user_model");
- }
- public function view()
- {
- $this->load->view('user');
- }
- public function index()
- {
- $username = $this->input->post('email');
- $test = $this->user_model->getUsername($username);
- if(!empty($test))
- {
- $test = 1;
- }else{
- $test = 0;
- }
- echo json_encode($test);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement