Get $500+ of the best After Effects files, video templates and music for only $20!
CodeIgniter From Scratch: Day 1
videos

CodeIgniter From Scratch: Day 1

This entry is part 1 of 17 in the CodeIgniter From Scratch Session
Next »

After numerous requests, today we are launching a new screencast series on Nettuts+ that will focus exclusively on the CodeIgniter PHP framework. Over the course of about 10 videos, I’ll teach you exactly how to use this framework. Ultimately, we’ll work our way up to building a custom CMS. Without further ado, here’s day one!

Day 1


Add Comment

Discussion 550 Comments

Comment Page 8 of 8 1 ... 6 7 8
  1. candlemaker says:

    The tutorial works fine. Just use the new CI classes as noted above and double check the code. It does work.

  2. Kemal says:

    Hi;

    Your videos in this series is not working. Just a blank screen. Firefox, Chrome, Opera..

    Please get this fixed. I’m paying 9 bucks a month !

    Thanks !

    KP

  3. Greg says:

    All of these tutorials are great, however with the ongoing change in the web development and coding world, are these videos still accurately relevant to the current state of Code Igniter?

  4. Alex says:

    Прикольные обои)

  5. jim says:

    beautiful helpfull!!!

  6. jack says:

    Videos still don’t load, just blank screen. Tried everything, every browser, even the new CI classes didn’t work. Something wrong here. Someone posted .flv file, I’ll try that.

  7. Ben says:

    Thanks for this great tutorial. I’m new at CodeIgniter and though the documentation is great, I couldn’t find any decent video tutorials until this one.

    However, I am having some difficulties as I am also learning POO at the same time. Primarily I am having a hard time understanding Arrays of Objects…

  8. Noirita says:

    I cant see video – just a blank page. plz help

  9. Robo says:

    Great introduction to CodeIgniter. I am looking forward to watching the rest of the series.

  10. moshmage says:

    so i had to view the tutorial twice, laad made me laught twice ^^’

  11. pallav says:

    we have to use CI_Controller{} for the new codeigniter versions…

    can anybody tell me if that CI is the folder name in this case, or its just new syntax?

  12. andrew says:

    Isn’t it against the concept of the MVC pattern to have the model access the database?

  13. rohan s says:

    I am facing problems in running php on windows environment , can somebody help with that

    I have installed WAMP which isnt opening up.

  14. TC says:

    I get to 21.34 in the video where we are editing routes.php changing the default_controller from welcome to site, but when I do that and refresh the browser, I get an error:

    Parse error: syntax error, unexpected ‘{‘ in H:\…\htdocs\CI\application\models\site_model.php on line 5

    I’ve made a bunch of errors and overcome them so far, but since I followed this to the “T” and Jeffrey’s problem was only that he had “laad” instead of “load” in his code, I do not know what to do.

    I would be grateful for any suggestions

    P.S. I have appended model and controller to CI_Model and CI_Controller already, so that is not the problem.

    This is the code for site_model that has the error:
    YOUR CODE

    <?php
    class site_model extends CI_Model {
    function getAll() {
    $q = $this->db->get(‘test’);
    if($q->num->rows() > 0 {
    foreach ($q->result() as $row) {
    $data[] = $row;
    }
    return $data;
    }
    }
    }

  15. timj says:

    You are missing a bracket to close off the if clause. Add a ) after the 0.

  16. sarmen says:

    for anyone having trouble playing the video, i noticed it only works on firefox for some reason.
    here is the url outside of nettuts

    http://blip.tv/play/gcMVgZGVKAI.html

  17. Derek says:

    I’m getting a “NetworkError: 500 Internal Server Error – http://localhost:8888/read/” error in my firebug console every time I try to load the model I made…it doesn’t make sense.

    • Derek says:

      Nevermind I got it. Put CI_Model in the model I made…would be nice to know what else is changing too I keep running into little issues.

  18. John From Bangladesh says:

    Awesome…. Thank you so much. It’s really so much Helpful. God Bless….. :)

  19. Emil John Bustos says:

    I have same problem with TC

    db->get(‘test’);
    if($q->num_rows() >0){
    foreach($q->result() as $row){
    $data[]= $row;
    }
    return $data;
    }
    }
    }
    ?>

    Parse error: syntax error, unexpected T_OBJECT_OPERATOR in C:\wamp\www\blog\thetest\application\models\site_model.php on line 5

  20. Emil John Bustos says:

    This is the code

    db->get(‘test’);
    if($q->num_rows() >0){
    foreach($q->result() as $row){
    $data[]= $row;
    }
    return $data;
    }
    }
    }
    ?>

    Parse error: syntax error, unexpected T_OBJECT_OPERATOR in C:\wamp\www\blog\thetest\application\models\site_model.php on line 5

  21. Emil John Bustos says:

    db->get(‘test’);
    if($q->num_rows() >0){
    foreach($q->result() as $row){
    $data[]= $row;
    }
    return $data;
    }
    }
    }
    ?>

    Parse error: syntax error, unexpected T_OBJECT_OPERATOR in C:\wamp\www\blog\thetest\application\models\site_model.php on line 5

  22. Ampere says:

    hey that was a nice tutorial for a newbie… thanks for the tutorial

  23. JurLan says:

    This looks like a great tutorial, but before I get started: I suppose these videos are also good when using CodeIgniter 2.10?
    Thanks.

  24. I’ve been reviewing codeigniter since yesterday and I am just a newbie. Thanks for the post! It makes me have clearer view of the framework. I’m going to continue on watching this series.

  25. Soner says:

    This tutorial series is spectacular!

    Thank you very much!

  26. Jaiveek says:

    Your Videos are awesome for starter….!!! :) thanks for postin this.

  27. Pieter says:

    Everthing works fine until I type

    Parse error: syntax error, unexpected T_ENDFOREACH in /Applications/XAMPP/xamppfiles/htdocs/ci/application/views/home.php on line 14

    <?php foreach ($records as $row); ?>
    <h1> <?php echo $row->title; ?> </h1>
    <?php endforeach; ?>

  28. Anudeep says:

    Plz help me to download the video

  29. thank you says:

    thank you

  30. disafol says:

    Excellent intro to codeigniter, but even better intro to MVC. There are very few good videos on this. Creating classes in both M and C confused the hell out of me – which should go where – type-of-thing, but the explanation at the end cleared it up. Big hand to Jeffrey Way. Twitching to get on with it, but I’ll need to watch the rest of the videos before I dig a hole big enough to bury myself. :)

  31. foysal says:

    thanks a bunch man! its really helping me out! thumbs up for you jeffery! :)

  32. zziapex says:

    thanks for these tutorials.just finish my first video

  33. This is a pretty old tutorial, desperately in need of being updated. I’m wondering why there aren’t more tutorials for CodeIgniter out there?

  34. Great tutorial ! And to counter some of the people here saying that this is outdated :), most of the system is still the same. Except for some minor things like CI_Model and CI_Controller instead of Model and Controller you won’t have any difficulty with this introductory video.

    Maybe a little hint ( since once of the main reasons to use codeigniter is to speed up development and to “beautify” your code.

    The foreach right at the end can be shortened to the following :

    title; ?>

    no need to use the foreach closing tag :) it’ll only confuse people ( unless they’re coming from a vb.net background :p )

  35. Dave W says:

    How would you use get data from a relational data db? e.g. if we had a table for blog posters/user and a table for blog postings and we wanted to show all blog posts from a specific poster/user?

    could this be done via active record or would it have to be a specific model built for the one query?

  36. zizidorf says:

    i keep geting a 404 mesage!! i cant access a welcome controller and all but if i a want access a index function in site controller i get a 404! why? if a change default route to ‘site’ it works … i am using linux with LAMP

  37. Rafa S says:

    result() as $row) : ?>
    title; ?>
    text; ?>

    I cant get the database rows to echo out i checked my model it looks fine and the controller I have tried searching it but still new to CI but can’t get that fixed you think you can help.

  38. Rafa S says:

    A PHP Error was encountered

    Severity: Warning

    Message: Invalid argument supplied for foreach()

    Filename: views/home.php

    Line Number: 12

    This is the warning i am getting i for got to put the right snippets to my code

  39. Jiro says:

    Nice Tutorial for a beginner in CodeIgniter. It helps me a lot in to start with CodeIgniter.

  40. lollypop says:

    Amazing tutorial. I really thank you about this.

  41. Ruturaaj says:

    Is there any way I can download this video? I want to have it on my Android Phone and view it as and when I get time. Somehow this page doesn’t play the video properly in Android.

  42. Naman Goel says:

    I love the long series on CI. I’m just getting started for now..
    I’d LOOVE to see a YII tutorial. If possible.

  43. Jeff says:

    Is anyone getting errors from home.php after following the tut? I’m not able to show the array or foreach out the data

    Site Model

    db->get(‘test’);

    if($q->num_rows() > 0) {
    foreach ($q->result() as $row)

    {
    $data[] = $row;
    }
    return $data;
    }

    }

    }

    Site

    load->model(‘site_model’);
    $data['$records'] = $this->site_model->getAll();
    $this->load->view(‘home’, $data);

    }

    }

    When input into home.php statements do not validate as well

  44. george says:

    use CI_Controller instead of controller

  45. Alex says:

    I can’t see anything. I’m using my iPad with latest release of the IOS. Can you fix this? Why don’t you just use YouTube for your videos?

Comment Page 8 of 8 1 ... 6 7 8

Add a Comment

To add a code snippet to your comment, please wrap your code like so: <pre name="code" class="html">YOUR CODE</pre>. You can replace the class name with "js," "css," "sql," or "php." If there are any "<" or ">" within your code, please search and replace them with: &lt; and &gt; respectively.