Location: PHPKode > projects > PHP File Database > fdat/sources/cookieSetGet.php
<?php
/*
###############################################################################
# cookieSetGet.php                                                            #
###############################################################################
# FDat (File Database) Beta Version                                           #
# Open-Source Project by Jeffrey Gelens (hide@address.com)                  #
# =========================================================================== #
# Copyright (c) 2001 Jeffrey Gelens - All Rights Reserved                     #
#                                                                             #
# This program is free software; you can redistribute it and/or               #
# modify it under the terms of the GNU General Public License                 #
# as published by the Free Software Foundation; either version 2              #
# of the License, or (at your option) any later version.                      #
###############################################################################
*/
function set_cookie($which, $cookiename, $username, $cookiepath) {
switch ($which) {
  case "login":
    setcookie ($cookiename, base64_encode($username), 0, $cookiepath);
    break;
  case "logout":
    setcookie ($cookiename, $username, 0, $cookiepath);
    break;
}
}
?>
Return current item: PHP File Database