Created
July 18, 2019 09:24
-
-
Save wsupajirakit/410b68d8a81527e478b2cc5386da4be4 to your computer and use it in GitHub Desktop.
model/Simple_model.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Simple_model extends CI_Model | |
{ | |
// function get_req(){ | |
// $query = $this->db->query("SELECT * FROM member"); | |
// $this->session->set_flashdata('status', 'true'); | |
// return $query->result(); | |
// } | |
function check_login(){ | |
$username = $_POST['username']; | |
$password = $_POST['password']; | |
$query = $this->db->query("SELECT * FROM member | |
WHERE Username_member = '$username' and Password_member = '$password'"); | |
$row_user = $query->num_rows(); | |
if($row_user==1){ | |
return $row_user; | |
}else{ | |
return $row_user; | |
} | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment