This blog is my way of me keeping track of the code that I write and documenting my thought processes. I like writing programs in Python and dabble in web development with some PHP here and there, nothing too advance. I enjoy playing around with Raspberry Pis and Arduino boards. Nothing major, just little projects like motion sensors and remote control LEDs. I am also working with a friend to help create his website and write content over at sliceofapi.co.uk. I won’t be updating the posts as I go so any changes that occur to software that may break my documented installation procedure won’t be updated, however, I am very happy to reply to people’s comments if they need help.
Now we can actually create our model and some users. We don’t want to store our users passwords in plain text in our database and so we will
Using the default root user for all your applications is fine as long as you don’t plan on exposing any of said applications to the internet or any other people that aren’t you. Adding extra users to your MySQL server is a piece of cake and I personally like to have a different user for each application that I have.
So we have our controller, but we don’t have any users or any way to check a user. We also need to configure CodeIgniter to use sessions so that you don’t have to login to every single page you visit. To do this we will need to edit the config files in the application/config directory.
Countless times I have bought a CD and ripped it to my music collection only to find that it has no meta data. No artist, no album and worst off all no album art (I like my album art alright). There are countless tools out there that could do this for me but I wanted one that I had made because why not?
So now that we have a basic understanding of what the different parts of CodeIgniter are, we can get down to writing our first controller. The login controller. As we don’t want just anyone being able to access our site.
CodeIgniter approaches web development with MVC in mind. MVC is a way of presenting data that keeps programme logic and presentation separate from each other. This means that there is little PHP scripting in your presentation pages, keeping them clean and focused on looks.