Skip to content Skip to sidebar Skip to footer

Tutorial on Creating a Web Course Registration Using Codeigniter: Admin Logout Function [Bagian 18]

Wow, finally the author has arrived at the last stage in making a course registration website using this codeigniter framework, huh.

For this last stage, the author will discuss the process of making the logout function in the dashboard admin. At the end of this article the author has also prepared full source code from Part 1 to Part 18 and given live demo course registration website.

Read also:

CREATE A LOGOUT FUNCTION ON DASHBOARD ADMIN

1. Add the following code in files welcome.php found in folder C:\xampp\htdocs\inwepo\application\controllers\admin.

function logout()  {    $this->session->unset_userdata('Login');    redirect('welcome','refresh');  }

2. After that, add the program snippet as below on files header.php found in folder C:\xampp\htdocs\inwepo\application\views\admin.

So when the admin chooses logout menu as shown below, it will automatically exit the admin page to the main page.

Then the main page of the course registration website will appear like this:

Taram, until we come to the end of the tutorial website this long and tiring one. Hopefully the readers will get useful knowledge from the presence of this article.

DOWNLOAD FILE

The author has also provided Full Source Code starting from the main page, user dashboard, dashboard admin, database as well as live demo of the created program.

Finally, the writer would like to thank the loyal readers of Inwepo here. See you in the making tutorial website the others yes.