• Wednesday , 20 September 2017

Integrate a Bootstrap Template into Code Igniter Learning Basics of MVC Frameworks

Code Canyon
https://i.ytimg.com/vi/xrgWY2fLOn0/hqdefault.jpg



Learn how to integrate a Bootstrap 3.0 Template from StartBootstrap into CodeIgniter and get introduced to building sites powered by the framework.

Original source

3d Ocean

Related Posts

30 Comments

  1. Imam Prawiranagara
    September 10, 2017 at 21:33

    subscribed! 😀

  2. sephy ragnaros
    September 10, 2017 at 21:33

    thanks!! 😀

  3. hindun eprys
    September 10, 2017 at 21:33

    thx its help me alot
    Bro I Just wanna thank you for these videos.
    Brother You are doing a fabulous job.
    I am beginner in Codeigniter and your videos gives me a good initiative to learn this,
    Most important is your are explaining each and everything , Within 3 days i learn a lot. Keep Going On Bro. Thanx : – )

    http://sumberkoneksiindonesia.com/
    http://ispmurah.com/
    http://cepatnet.com/
    http://fiberoptikinternet.com/
    http://providerinternetdedicated.com/
    http://ispdedicated.com

  4. Shoukat Mirza
    September 10, 2017 at 21:33

    thank you sir

  5. King Hope
    September 10, 2017 at 21:33

    Your effort and time is very much appreciated. You have been of tremendous help to me with my final year web modules. Thank you and God bless

  6. Pecon
    September 10, 2017 at 21:33

    You start off with Codeigniter already installed and don't say which version of Codeigniter you are working with?

  7. Bhavesh Keshrani
    September 10, 2017 at 21:33

    thank you for sharing this tutorial …..use full……

  8. Sangeeta Yadav
    September 10, 2017 at 21:33

    Thanxss , It helped me to understand how to make website .

  9. cjromb
    September 10, 2017 at 21:33

    I've got lots of PHP experience, and some Bootstrap & CodeIgniter experience; the pace on this tutorial was perfect for me! I totally giggled when, under your breath, you'd say "What happened here?" I like that you didn't delete that kind of thing; we learn best from things not working…and from seeing how other people solve it when things don't work for them.

    I have a few questions, if you're up for answering them. You put the echo base url command in the HTML in front of the subdirectories…what stopped you from just making them absolute links instead…i.e. putting a "/" in front of the directory name? Also, you mentioned at one point that you deleted other stuff you didn't need that came with CodeIgniter. I'm not sure what else you deleted, but I did notice the doc-root directory was MIA. I'm curious what else you nixed, and what was behind the decision to delete the doc-root? (Not questioning your decision…just interested in learning.)

    Thx again for putting this tutorial together. Looks like it helped lots of people, and it was interesting to see how someone else is implementing CodeIgniter and implementing Bootstrap inside it. I've started watching your next tutorial, too, and am looking forward to finishing it…but first…I need to get a Bootstrap template inside my CodeIgniter. 🙂

  10. KAPIL SHARMA
    September 10, 2017 at 21:33

    try this code then working properly

    .htaccess

    RewriteEngine on
    RewriteCond %{REQUEST_URI} !^/index.php
    RewriteRule .* index.php [L]

  11. KAPIL SHARMA
    September 10, 2017 at 21:33

    thanks dear its working bro……….. 🙂

  12. Vörös Zoltán Hero
    September 10, 2017 at 21:33

    Hi! I want to say thank for your effort from Hungary! Your video is very usefull and helpful. I have to learn Codeigniter because i have got my first developer job few day ago. I watched some other videos, but yours is my own favorite. I am starting to follow your chanel. Can i get your Skpye or another contact? 🙂

  13. hassan aabid
    September 10, 2017 at 21:33

    it's not working for me :/

  14. nicolas pavageau
    September 10, 2017 at 21:33

    how can I integrate the template adminLTE in CodeIgniter.
    Thanks for your response.

  15. omarrahman88
    September 10, 2017 at 21:33

    My bootstrap theme came with a 'server' folder. I am not sure where to place that, any hints?

  16. Jimmy Ly
    September 10, 2017 at 21:33

    Best tutorial I've ever seen. Very easy to follow and explanations are great. This is going to help a great ton for current and future projects. Thanks, keep up the good work!

  17. Sanoj Shrestha
    September 10, 2017 at 21:33

    great tutorial

  18. Best Android Games
    September 10, 2017 at 21:33

    thanks 😀

  19. Manish Sharma
    September 10, 2017 at 21:33

    Dude really nice but i want to ask something , how can we change the nav links (home , about) dynamically.
    ex- at home page only about link will be display and at about page only home link will be display.
    Please tell us

  20. Károly Tóth
    September 10, 2017 at 21:33

    i use html 5

  21. Rhidy khan
    September 10, 2017 at 21:33

    my css is not work.what can i do?

  22. Kesus Kim
    September 10, 2017 at 21:33

    It's really nice to show every steps even mistakes, really. it rocks.thx

  23. bill waddy
    September 10, 2017 at 21:33

    Great tutorial!

  24. jhun jhon
    September 10, 2017 at 21:33

    log in with session please 🙂

  25. Yug Shende
    September 10, 2017 at 21:33

    Can you make a new tutorial explaining how to build a CRUD system with Codeigniter?

  26. Michael Edward
    September 10, 2017 at 21:33

    hey bro,may ask u?
    i have trouble with my .htaccess at root (CI 3.0.1)

    i alr use this
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond $1 !^(index.php|assets|robots.txt)* *assets folder at root keep js n css
    RewriteRule ^(.*)$ index.php/$1 [L]

    still like this http://localhost/template/index.php/c_home/home
    n can't link file foundation

    have any solution bro?

  27. Ulysses Lanugon
    September 10, 2017 at 21:33

    It's kind of late but how to do this based on your template? localhost/account/400 – where 400 is a parameter. it gives a 404.

  28. john jackson
    September 10, 2017 at 21:33

    bro you sound exactly like fousytube

  29. NR. Selvaraja
    September 10, 2017 at 21:33

    Can you make new Codeigniter 3.0 tutorial?

  30. Narendra Verma
    September 10, 2017 at 21:33

    I am developing admin panel using codeigniter. How to compare the username and password form database?.whatever i am typing in username and password its going on next page …but my username and password is different in database.Below are the code which i done but its not working. i am fresher in codeigniter.Please help me in this…..

        *1) view page*     
    <html>
    <head><title> Admin Login</title>
    <link rel="stylesheet" href="../css/style.css">
    <link rel="stylesheet" href="../css/bootstrap.min.css">
    <script src="js/bootstrap.min.js"></script>

    </head>
    <body>

    </br></br>

    <div class="container row text-center">
        <div class="row">
          <div class="span4"></div>
          <div class="span4"><img class="center-block" src="../img/H.png" style="margin: 0 auto; width:85; height:85;" /></div>
          <div class="span4"></div>
      </div>

    </br></br></br>

    <form name="form" method="post" action="<?php echo site_url("home/chkLogin");?>">

    <div class="fs-fields">
    <input type="text" name="txtUsername" placeholder="Enter your Email ID"  id="q1" style="">

     <div class="span12"><img class="fs-fields" src="../img/line.png" style="  margin-left:10px;width:400px; height:7;" /></div>

    <input type="password" name="txtPassword" placeholder="Password" id="q1" class="other">

          <div class="span4"></div>
          <div class="span4"><img class="fs-fields" src="../img/line.png" style="margin-left:10px;width:400px; height:7;" /></div>
          <div class="span4"></div>

    </div>
    </br>
    </br>

    <input  class="btn-align" type="image"   name="btnSubmit" src="../img/proceed1.png" onmouseover="this.src='../img/proceed2.png'" onmouseout="this.src='../img/proceed1.png'" >

    </form>

     </div>
    </div>
    </body>
    </html>

        *2) Controller*
          ?php  
       class home extends CI_Controller  
       {  
          public function index()  
          {  
             //load the database  
             $this->load->database();  
             //loginform
             $this->load->view('login_view');

          }  
       public function chkLogin(){

        // Validate
        $this->load->library('form_validation');
       $this->form_validation->set_rules('txtUsername', 'Username','required');
        $this->form_validation->set_rules('txtPassword','Password','required');

        // INPUT

        $username = $this->input->post('txtUsername');
        $password = $this->input->post('txtPassword');
        $password = md5($password);

        // VALIDATE FORM

        if( $this->form_validation->run() == FALSE ){
            // Invalid

              $this->load->view('login_view');

        }else{
            // Valid

            $this->load->model('select'); 

            if($this->select->chkLogin($username, $password)){
                // Logged In
                $this->session->set_userdata('username',$username); // SET SESSION
            }else{
                // Invalid Credentials
                $data['error']="Invalid credentials. n Please try again !";
                $this->load->view('select_view',$data);
            }
        }
    }
       } 

    ?>   

        *3) Model*

        <?php  
       class select extends CI_Model  
       {  
          function __construct()  
          {  
             // Call the Model constructor  
             parent::__construct();  
          }  
          //we will use the select function  

    public function chkLogin($_username, $_password)
    {

        $_qry = "SELECT * FROM admin_login WHERE Username = '".$_username."' AND Password = '".$_password."' ";

        $_res = $this->db->query($_qry);

        if ($_res->num_rows() > 0)
        {        
            return TRUE ;    
        }
       else 
       {
          return FALSE;
       }
    }

       }  
    ?>

Leave A Comment

You must be logged in to post a comment.