View Single Post
Old 01-03-2012, 03:22 AM   #1 (permalink)
Kingdom
The Visitor
 
Kingdom's Avatar
 
Join Date: Jan 2011
Posts: 3
Thanks: 1
Kingdom is on a distinguished road
Help Problem updating Cookie on live host

This works fine on localhost, but the same code just won't update my live website cookie. Here's the code:

index.php
PHP Code:
    $lg->updateCookies($username$hashSalt[0]); 
updateCookies function:
PHP Code:
    $site '.ciadacapa.com.br'

    
// ---------------------------------------------------
    // Updates the cookies
    // ---------------------------------------------------
    
function updateCookies($username$hash){
        
setcookie('ciadacapaUser'''time()-3600'/'$this->site);
        
setcookie('ciadacapaHash'''time()-3600'/'$this->site);
        
setcookie('ciadacapaUser'$usernametime()+3600*24*7'/'$this->site);
        
setcookie('ciadacapaHash'$hashtime()+3600*24*7'/'$this->site);
        
        return 
true;
    } 
Although the class is receiving the correct values, the cookie just retains the old value it had and never updates. Any ideas on this?

Thanks in advance!
Kingdom is offline  
Reply With Quote