Smartlab Software logo

Add Logout to OptionCart Deluxe

Adding a logout link to OptionCart is pretty easy to do.

Instructions

1. create logout.php in shopadmin directory with the following code:

<?php
// logout of shopadmin

// delete our cookie
setcookie("adminpswd", "", time()-42000, '/');

// goto login page
header ("location:index.php");
?>

2. in footer.htm (in shopadmin) I modified it like so (note I changed the copyright symbol to &copy;)

<p align="center" class="smalltext">
<a href="logout.php">Logout</a><br>
OptionCart Deluxe Catalog Version 2.1<br>
Copyright &copy; <a href="http://www.optioncart.com">OptionCart.com</a>. All rights reserved.</p>

3. That is it! To logout click on Logout at the bottom of the admin page. It will take you back to the admin login page.