Web Shoppe
Home | Coding | PHP | Sign-up & Log-in Script | User Log-out

User Log-out

Finally, the last thing we need is a log out script. Just put a link called Log Out anywhere in the members section which directs the user to this script:

<?php

// expire cookie
setcookie ("loggedin", "", time() - 3600);

echo "You are now logged out.<br>";
echo "<a href=\"login.html\">Log in</a>.";

?>

This script just removes the cookie which said they were logged in. And that's it! If you have trouble putting all the code together, you can take a look at the whole thing here.

 

about this site
site map
forums
ask a question
link this site

html tutorials
css tutorials
php tutorials
javascript tutorials
htaccess tutorials

graphics design
graphics tutorials
website design
internet copyright

about domains
about web hosting
hosting tutorial
xentrik hosting
ftp tutorials

stats logger
search engines
code generators
button labeller
remote services

font archive
website layouts
website graphics
useful scripts