#native_company# #native_desc#

Test Cookies Enable

By Micah
on May 12, 2005

Version: 2.0

Type: Sample Code (HOWTO)

Category: HTTP

License: GNU General Public License

Description: Test is the user have Cookies Enable

function test_cookies_enabled(){
    //Make our test cookie.
    $success = setcookie("Test","Testing cookies");

    //If setcookie was succesful, $success will be TRUE.
    //Otherwise, it will be FALSE.
    //Unset our cookie and return the result.
    return $success;
    /* This is just used to test the function.
    Feel free to remove it and use the function in your
    PHP wherever! */
$cookies = test_cookies_enabled();
    print "Okay!";
    print "Not so Okay.";