Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ob_start();
- defined('BASEPATH') OR exit('No direct script access allowed');
- class LoginTwo extends CI_Controller
- {
- function __construct() {
- parent::__construct();
- $this->load->model("login_model", "login");
- }
- public function login()
- {
- $username = $this->input->post("username");
- $password = $this->input->post("password");
- $isCorrect = $this->login->validate_user($username, $password);
- if($isCorrect)
- {
- // Start your user session
- $dirName = $username;
- $dirPath = "folder/".$dirName."/";
- if (!file_exists($dirPath)) {
- mkdir("folder/" . $dirName, 0777, true);
- }
- redirect("your user page");
- }
- else
- {
- redirect("homepage");
- }
- }
- }?>
- $path = FCPATH.'/uploads/';
- $new_directory = 'name';
- mkdir($path.$name,0755,TRUE);
- public function login()
- {
- $username = $this->input->post("username");
- $password = $this->input->post("password");
- $isCorrect = $this->user_model->checkCredentials($username, $password);
- if($isCorrect)
- {
- // Start your user session
- $dirName = $username;
- $dirPath = "folder/".$dirName."/";
- if (!file_exists($dirPath)) {
- mkdir("folder/" . $dirName, 0777, true);
- }
- redirect("your user page");
- }
- else
- {
- redirect("homepage");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement