In today’s hour long video tutorial, we’ll be doing a lot! We’ll implement a login and signup form that will allow us to lock down certain sections of our fictional site. As you’ll find, working with sessions in CodeIgniter is a cinch!
Catch Up
- Day 1: Getting Started With the Framework
- Day 2: Database Selecting Methods
- Day 3: Sending Emails
- Day 4: Newsletter Signup
- Day 5: CRUD
Day 6: Sessions
More Viewing Options


P.S. The Logout Button
I forgot to add the “logout” button during the screencast. There was so much to cover, that I was bound to forget something! Luckily, it’s really easy. Simply add a link, to the “members” area, which links to the login class, and a “logout” method (login/logout). Then, all we must do is destroy the user’s session, and redirect them back to the login form. Download the source code if confused.
function logout()
{
$this->session->sess_destroy();
$this->index();
}
Hope you Enjoy it!
Keep in mind that we’re just scratching the surface, in terms of flexibility and security. We can – and very well may – take things much further. But this should get you started!
Thank you, Screencast.com!
- Follow us on Twitter, or subscribe to the Nettuts+ RSS Feed for more daily web development tuts and articles.
- icantstop
- http://www.freshclickmedia.com Shane
- jeanv
- http://aryandelhi.webs.com aryan
- http://www.antonagestam.se Anton Agestam
- http://sliversofmysoul.netsons.org fluxish
- Anmol
- Vishal
- arnold
- http://systemride.com Nick
- http://geek-like-me.com Baylor Rae’
- Vincent
- Carlos Caniguante
- http://bazargostaran.com Hooman Asgari
- http://www.fatlizardmedia.com Juan C Rois
- Mathew Davies
- Mathew Davies
- Jeff
- http://www.fatlizardmedia.com Juan C Rois
- Alain
- Robert DeBoer
- http://simon.vansintjan.org Simon
- http://www.kamaroc.com Kamal El Fatihi
- http://nathanledet.com Nathan Ledet
- Guillermo Carrion
- http://voratec.com Ashit Vora
- Wiredesignz
- eglyph
- http://twitter.com/kevinquillen Kevin Quillen
- Javed Gardezi
- http://www.xtensives.com Hasanga
- Rahul
- Kenshin
- ricochet
- macCesar
- ibura
- http://www.philsbury.co.uk Phil
- Fynn
- Carlos
- Shaun C.
- http://www.jaaprood.nl Jaap Rood
- http://blog.315design.com/ Mike
- JT
- http://www.mykethecomputerguy.com Myke Bates
- http://tutorial-city.net Tutorial City
- http://www.benoitvilliere.com Benoit
- Bobbybazooka
- http://www.brianswebdesign.com Brian Gottier
- Cody
- Sri
- http://www.fatlizardmedia.com Juan C Rois
- http://www.fatlizardmedia.com Juan C Rois
- dani
- http://www.encoder2002.com Daniel Sitnik
- http://kreatemarket.com Fred Flinston
- http://www.umoor.eu/blog/ umoor
- rosnovski
- C.44
- http://www.kriesi.at Kriesi
- timo.huber
- ibura
- Amine
- tom kirby
- http://guthnur.net richard
- http://www.itsmotherfuckintylerperry.com Tyler Perry
- http://tutorial-city.net/ Tutorial City
- Vishal
- http://www.soulsizzle.com Ryan
- http://mike.carinslater.com slatron
- Vishal
- Karl Fredrik
- Vishal


