Submit Search
Upload
24. CodeIgniter simple login with sessions
•
0 likes
•
123 views
Razvan Raducanu, PhD
Follow
CodeIgniter simple login with sessions
Read less
Read more
Education
Report
Share
Report
Share
1 of 8
Recommended
23. CodeIgniter sessions
23. CodeIgniter sessions
Razvan Raducanu, PhD
17. CodeIgniter login simplu cu sesiuni
17. CodeIgniter login simplu cu sesiuni
Razvan Raducanu, PhD
23.simple login with sessions in laravel 5
23.simple login with sessions in laravel 5
Razvan Raducanu, PhD
Php if
Php if
nurhardianti98
Code igniter parameter passing techniques
Code igniter parameter passing techniques
Rakhitha Ratnayake
Codeigniter : Custom Routing - Manipulate Uri
Codeigniter : Custom Routing - Manipulate Uri
Abdul Malik Ikhsan
Binary Studio Academy 2016: Laravel Controllers
Binary Studio Academy 2016: Laravel Controllers
Binary Studio
Latihan form login
Latihan form login
Edy Sinaga
Recommended
23. CodeIgniter sessions
23. CodeIgniter sessions
Razvan Raducanu, PhD
17. CodeIgniter login simplu cu sesiuni
17. CodeIgniter login simplu cu sesiuni
Razvan Raducanu, PhD
23.simple login with sessions in laravel 5
23.simple login with sessions in laravel 5
Razvan Raducanu, PhD
Php if
Php if
nurhardianti98
Code igniter parameter passing techniques
Code igniter parameter passing techniques
Rakhitha Ratnayake
Codeigniter : Custom Routing - Manipulate Uri
Codeigniter : Custom Routing - Manipulate Uri
Abdul Malik Ikhsan
Binary Studio Academy 2016: Laravel Controllers
Binary Studio Academy 2016: Laravel Controllers
Binary Studio
Latihan form login
Latihan form login
Edy Sinaga
TICT #13
TICT #13
azman_awan9
TICT #11
TICT #11
azman_awan9
Goodbye hook_menu() - Routing and Menus in Drupal 8
Goodbye hook_menu() - Routing and Menus in Drupal 8
Exove
Jinja2 Templates - San Francisco Flask Meetup
Jinja2 Templates - San Francisco Flask Meetup
Alan Hamlett
Drupal 8 Routing
Drupal 8 Routing
Yuriy Gerasimov
14. CodeIgniter adaugarea inregistrarilor
14. CodeIgniter adaugarea inregistrarilor
Razvan Raducanu, PhD
Building scalable products with WordPress - WordCamp London 2018
Building scalable products with WordPress - WordCamp London 2018
Elliot Taylor
SQL so close I can paste it (YAPC::NA::2011 lightning talk)
SQL so close I can paste it (YAPC::NA::2011 lightning talk)
bradoaks
Routing in Drupal 8
Routing in Drupal 8
kgoel1
20. CodeIgniter edit images
20. CodeIgniter edit images
Razvan Raducanu, PhD
Practica csv
Practica csv
Nones Pomposo
16. CodeIgniter stergerea inregistrarilor
16. CodeIgniter stergerea inregistrarilor
Razvan Raducanu, PhD
Growing jQuery
Growing jQuery
gueste8d8bc
Laravel the right way
Laravel the right way
Matheus Marabesi
07 Php Mysql Update Delete
07 Php Mysql Update Delete
Geshan Manandhar
15. CodeIgniter editarea inregistrarilor
15. CodeIgniter editarea inregistrarilor
Razvan Raducanu, PhD
Laravel, the right way - PHPConference 2016
Laravel, the right way - PHPConference 2016
Matheus Marabesi
6. hello popescu 2
6. hello popescu 2
Razvan Raducanu, PhD
Owasp & php
Owasp & php
Ahmed Kamel Taha
Drupal sins 2016 10-06
Drupal sins 2016 10-06
Aaron Crosman
Building Persona: federated and privacy-sensitive identity for the Web (Open ...
Building Persona: federated and privacy-sensitive identity for the Web (Open ...
Francois Marier
Building Persona: federated and privacy-sensitive identity for the Web (LCA 2...
Building Persona: federated and privacy-sensitive identity for the Web (LCA 2...
Francois Marier
More Related Content
What's hot
TICT #13
TICT #13
azman_awan9
TICT #11
TICT #11
azman_awan9
Goodbye hook_menu() - Routing and Menus in Drupal 8
Goodbye hook_menu() - Routing and Menus in Drupal 8
Exove
Jinja2 Templates - San Francisco Flask Meetup
Jinja2 Templates - San Francisco Flask Meetup
Alan Hamlett
Drupal 8 Routing
Drupal 8 Routing
Yuriy Gerasimov
14. CodeIgniter adaugarea inregistrarilor
14. CodeIgniter adaugarea inregistrarilor
Razvan Raducanu, PhD
Building scalable products with WordPress - WordCamp London 2018
Building scalable products with WordPress - WordCamp London 2018
Elliot Taylor
SQL so close I can paste it (YAPC::NA::2011 lightning talk)
SQL so close I can paste it (YAPC::NA::2011 lightning talk)
bradoaks
Routing in Drupal 8
Routing in Drupal 8
kgoel1
20. CodeIgniter edit images
20. CodeIgniter edit images
Razvan Raducanu, PhD
Practica csv
Practica csv
Nones Pomposo
16. CodeIgniter stergerea inregistrarilor
16. CodeIgniter stergerea inregistrarilor
Razvan Raducanu, PhD
Growing jQuery
Growing jQuery
gueste8d8bc
Laravel the right way
Laravel the right way
Matheus Marabesi
07 Php Mysql Update Delete
07 Php Mysql Update Delete
Geshan Manandhar
15. CodeIgniter editarea inregistrarilor
15. CodeIgniter editarea inregistrarilor
Razvan Raducanu, PhD
Laravel, the right way - PHPConference 2016
Laravel, the right way - PHPConference 2016
Matheus Marabesi
6. hello popescu 2
6. hello popescu 2
Razvan Raducanu, PhD
Owasp & php
Owasp & php
Ahmed Kamel Taha
What's hot
(19)
TICT #13
TICT #13
TICT #11
TICT #11
Goodbye hook_menu() - Routing and Menus in Drupal 8
Goodbye hook_menu() - Routing and Menus in Drupal 8
Jinja2 Templates - San Francisco Flask Meetup
Jinja2 Templates - San Francisco Flask Meetup
Drupal 8 Routing
Drupal 8 Routing
14. CodeIgniter adaugarea inregistrarilor
14. CodeIgniter adaugarea inregistrarilor
Building scalable products with WordPress - WordCamp London 2018
Building scalable products with WordPress - WordCamp London 2018
SQL so close I can paste it (YAPC::NA::2011 lightning talk)
SQL so close I can paste it (YAPC::NA::2011 lightning talk)
Routing in Drupal 8
Routing in Drupal 8
20. CodeIgniter edit images
20. CodeIgniter edit images
Practica csv
Practica csv
16. CodeIgniter stergerea inregistrarilor
16. CodeIgniter stergerea inregistrarilor
Growing jQuery
Growing jQuery
Laravel the right way
Laravel the right way
07 Php Mysql Update Delete
07 Php Mysql Update Delete
15. CodeIgniter editarea inregistrarilor
15. CodeIgniter editarea inregistrarilor
Laravel, the right way - PHPConference 2016
Laravel, the right way - PHPConference 2016
6. hello popescu 2
6. hello popescu 2
Owasp & php
Owasp & php
Similar to 24. CodeIgniter simple login with sessions
Drupal sins 2016 10-06
Drupal sins 2016 10-06
Aaron Crosman
Building Persona: federated and privacy-sensitive identity for the Web (Open ...
Building Persona: federated and privacy-sensitive identity for the Web (Open ...
Francois Marier
Building Persona: federated and privacy-sensitive identity for the Web (LCA 2...
Building Persona: federated and privacy-sensitive identity for the Web (LCA 2...
Francois Marier
Mashing up JavaScript
Mashing up JavaScript
Bastian Hofmann
Mashing up JavaScript – Advanced Techniques for modern Web Apps
Mashing up JavaScript – Advanced Techniques for modern Web Apps
Bastian Hofmann
Login and Registration form using oop in php
Login and Registration form using oop in php
herat university
Routing in Drupal 8
Routing in Drupal 8
kgoel1
5. CodeIgniter copy1
5. CodeIgniter copy1
Razvan Raducanu, PhD
Php update and delet operation
Php update and delet operation
syeda zoya mehdi
Design strategies for AngularJS
Design strategies for AngularJS
SmartOrg
ACL in CodeIgniter
ACL in CodeIgniter
mirahman
10. view one record
10. view one record
Razvan Raducanu, PhD
Add loop shortcode
Add loop shortcode
Peter Baylies
laravel tricks in 50minutes
laravel tricks in 50minutes
Barang CK
50 Laravel Tricks in 50 Minutes
50 Laravel Tricks in 50 Minutes
Azim Kurt
WordPress REST API hacking
WordPress REST API hacking
Jeroen van Dijk
Creating a Simple PHP and MySQL-Based Login System
Creating a Simple PHP and MySQL-Based Login System
Azharul Haque Shohan
Form demoinplaywithmysql
Form demoinplaywithmysql
Knoldus Inc.
Angular Workshop_Sarajevo2
Angular Workshop_Sarajevo2
Christoffer Noring
Bag Of Tricks From Iusethis
Bag Of Tricks From Iusethis
Marcus Ramberg
Similar to 24. CodeIgniter simple login with sessions
(20)
Drupal sins 2016 10-06
Drupal sins 2016 10-06
Building Persona: federated and privacy-sensitive identity for the Web (Open ...
Building Persona: federated and privacy-sensitive identity for the Web (Open ...
Building Persona: federated and privacy-sensitive identity for the Web (LCA 2...
Building Persona: federated and privacy-sensitive identity for the Web (LCA 2...
Mashing up JavaScript
Mashing up JavaScript
Mashing up JavaScript – Advanced Techniques for modern Web Apps
Mashing up JavaScript – Advanced Techniques for modern Web Apps
Login and Registration form using oop in php
Login and Registration form using oop in php
Routing in Drupal 8
Routing in Drupal 8
5. CodeIgniter copy1
5. CodeIgniter copy1
Php update and delet operation
Php update and delet operation
Design strategies for AngularJS
Design strategies for AngularJS
ACL in CodeIgniter
ACL in CodeIgniter
10. view one record
10. view one record
Add loop shortcode
Add loop shortcode
laravel tricks in 50minutes
laravel tricks in 50minutes
50 Laravel Tricks in 50 Minutes
50 Laravel Tricks in 50 Minutes
WordPress REST API hacking
WordPress REST API hacking
Creating a Simple PHP and MySQL-Based Login System
Creating a Simple PHP and MySQL-Based Login System
Form demoinplaywithmysql
Form demoinplaywithmysql
Angular Workshop_Sarajevo2
Angular Workshop_Sarajevo2
Bag Of Tricks From Iusethis
Bag Of Tricks From Iusethis
More from Razvan Raducanu, PhD
12. edit record
12. edit record
Razvan Raducanu, PhD
11. delete record
11. delete record
Razvan Raducanu, PhD
9. add new record
9. add new record
Razvan Raducanu, PhD
8. vederea inregistrarilor
8. vederea inregistrarilor
Razvan Raducanu, PhD
7. copy1
7. copy1
Razvan Raducanu, PhD
5. hello popescu
5. hello popescu
Razvan Raducanu, PhD
4. forme in zend framework 3
4. forme in zend framework 3
Razvan Raducanu, PhD
3. trimiterea datelor la vederi
3. trimiterea datelor la vederi
Razvan Raducanu, PhD
2.routing in zend framework 3
2.routing in zend framework 3
Razvan Raducanu, PhD
1. zend framework intro
1. zend framework intro
Razvan Raducanu, PhD
18. images in symfony 4
18. images in symfony 4
Razvan Raducanu, PhD
17. delete data
17. delete data
Razvan Raducanu, PhD
16. edit data
16. edit data
Razvan Raducanu, PhD
15. view single data
15. view single data
Razvan Raducanu, PhD
14. add data in symfony4
14. add data in symfony4
Razvan Raducanu, PhD
13. view data
13. view data
Razvan Raducanu, PhD
12.doctrine view data
12.doctrine view data
Razvan Raducanu, PhD
11. move in Symfony 4
11. move in Symfony 4
Razvan Raducanu, PhD
10. add in Symfony 4
10. add in Symfony 4
Razvan Raducanu, PhD
9. lower in Symfony 4
9. lower in Symfony 4
Razvan Raducanu, PhD
More from Razvan Raducanu, PhD
(20)
12. edit record
12. edit record
11. delete record
11. delete record
9. add new record
9. add new record
8. vederea inregistrarilor
8. vederea inregistrarilor
7. copy1
7. copy1
5. hello popescu
5. hello popescu
4. forme in zend framework 3
4. forme in zend framework 3
3. trimiterea datelor la vederi
3. trimiterea datelor la vederi
2.routing in zend framework 3
2.routing in zend framework 3
1. zend framework intro
1. zend framework intro
18. images in symfony 4
18. images in symfony 4
17. delete data
17. delete data
16. edit data
16. edit data
15. view single data
15. view single data
14. add data in symfony4
14. add data in symfony4
13. view data
13. view data
12.doctrine view data
12.doctrine view data
11. move in Symfony 4
11. move in Symfony 4
10. add in Symfony 4
10. add in Symfony 4
9. lower in Symfony 4
9. lower in Symfony 4
Recently uploaded
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
UnboundStockton
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
Celine George
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
thorishapillay1
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
pboyjonauth
Full Stack Web Development Course for Beginners
Full Stack Web Development Course for Beginners
Sabitha Banu
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
InMediaRes1
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
ssuser54595a
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
9953056974 Low Rate Call Girls In Saket, Delhi NCR
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
NirmalaLoungPoorunde1
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
Sarwono Sutikno, Dr.Eng.,CISA,CISSP,CISM,CSX-F
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
arsicmarija21
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
iammrhaywood
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
Virag Sontakke
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
Mahmoud M. Sallam
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
OH TEIK BIN
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
Jisc
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
jaredbarbolino94
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
UjwalaBharambe
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
9953056974 Low Rate Call Girls In Saket, Delhi NCR
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
JhezDiaz1
Recently uploaded
(20)
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
Full Stack Web Development Course for Beginners
Full Stack Web Development Course for Beginners
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
24. CodeIgniter simple login with sessions
1.
Simple login with
sessions in CodeIgniter 3
2.
config/routes.php $route['default_controller'] = 'LoginController'; $route['404_override']
= ''; $route['translate_uri_dashes'] = FALSE;
3.
LoginController <?php defined('BASEPATH') OR exit('No
direct script access allowed'); class LoginController extends CI_Controller { public function index() { $data['title'] ="Login form"; $this->load->view('main_view',$data); }
4.
public function check() { if((($_POST["text1"]=="user1")&&($_POST["pass1"]=="pass1"))) { $this->session->set_userdata('username',$_POST["text1"]); return
redirect('LoginController/ura'); } else{ echo "Wrong input!"; exit; } }
5.
public function ura() { if($this->session->userdata('username')){ $data['uname']=$this->session->userdata('username'); $this->load->view('ura',$data); } else{ return
redirect('LoginController/index'); } } public function logout() { $this->session->sess_destroy(); redirect('LoginController/index'); } }
6.
views/main_view.php <h1> <?php echo $title;
?> </h1> <?php echo form_open('LoginController/check'); #text control $data = ['name' => 'text1', 'id' => 'text1', 'value' => '', 'maxlength' => '100', 'size' => '30', 'placeholder'=>'username', ]; #label echo form_label('Username ', 'text1'); echo form_input($data);
7.
echo "<br><br>"; #password control $pass
= ['name' => 'pass1', 'id' => 'pass1', 'maxlength' => '100', 'size' => '30', 'placeholder'=>'password', ]; echo form_label('Password ', 'pass1'); echo form_password($pass); echo "<br><br>"; #submit button echo form_submit('submit', 'Submit!'); echo form_close();
8.
ura.blade.php <?php echo "Welcome ".$uname."!"; echo
"<br/><br/>"; ?> <a href="<?php echo site_url('LoginController/logout') ?>">Logout</a><br/><br/>