Advertisement
Guest User

Untitled

a guest
Nov 3rd, 2016
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. controller :
  2. <?php
  3.  
  4. class Full extends CI_Controller{
  5.  
  6. function __construct(){
  7. parent:: __construct();
  8. // $this->load->database('full',TRUE);
  9. //$this->load->model('full/m_full');
  10. }
  11.  
  12. function index(){
  13.  
  14. if(isset($_POST['username']) and $_POST['password'])
  15. {
  16. $username = $_POST['username'];
  17. $password = $_POST['password'];
  18.  
  19.  
  20.  
  21. if($username == '1' && $password == '1')
  22.  
  23. {
  24. $abc = array("output" => 1, "result" => "success");
  25. print_r($abc);
  26. //printf($abc);
  27.  
  28. }
  29.  
  30. else
  31.  
  32. {
  33. $abc = array("output" => 0, "result" => "failure");
  34. print_r($abc);
  35.  
  36. }
  37.  
  38.  
  39. }
  40. else
  41. {
  42. $this->load->view('index.php');
  43. }
  44.  
  45.  
  46. function login(){
  47.  
  48. }
  49. }
  50.  
  51. }
  52.  
  53. ?>
  54.  
  55.  
  56.  
  57. view
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement