Page 1 of 1

cookie issues

Posted: Fri Sep 11, 2009 3:28 pm
by jmoncrieff
hello,
I have wrote a application over the last couple of months and I am currently in the stage of releasing it to the client. but yesterday I upload the new site (Jommla with jomfish and my new application) to there server. there sames to be a problem getting the language cookie from jommla to my appilcation witch is two directory below Jommla ie
/cms and my appilcation is /cms/servicedesk/fontend/

I used the This method to get the lang variable.

Code: Select all

 
$langchk=$_COOKIE['jfcookie'];
$lang=$langchk['lang'];
 


is there any in the php.ini that could be causing and can be corrected with tweaking the .htaccess. I just do not want have rewrite my code if I do not have to. I as I am also in school also so my time is limited


Thanks In advance

Re: cookie issues

Posted: Fri Sep 11, 2009 9:30 pm
by jmoncrieff
I ended up Creating a new function and defining the cookie path to ie: /newsite/cms

Code: Select all

 
function get_lang(){
define('cookie_path',$cmspath);
if(isset($_COOKIE['jfcookie'])){    
$langchk=$_COOKIE['jfcookie'];
$lang=$langchk['lang'];
}
else
{
    $lang='en';
}
return $lang;
}
This works perfectly now.
Jeff