Dear Sir
Thank you for your help. May I ask whether the session can be saved for a long time such as a year? I have a setcookie code which as 3 parameters: currency, currency symbol and exchange rate. All of them retrieved from DB. Do you know how do they use?
if (isset($currency)) {
$sql = "SELECT * FROM `currency` where currencyid='".$currency."'";
$result = mysql_query($sql);
while( $item = mysql_fetch_array($result)){
$currency_symbol=$item["symbol"];
$exchange_rate=$item["exchangerate"];
}
setcookie ("last_currency","",time()-60,"/","localhost",0);
setcookie ("last_currency",$currency,time()+60*60*24*365*10),"/","localhost",0);
setcookie ("last_currency_symbol","",time()+(60*60*24*365*10),"/","localhost",0);
setcookie ("last_currency_symbol",$currency_symbol,time()+(60*60*24*365*10),"/","localhost",0);
setcookie ("last_currency_exchange_rate","",time()+(60*60*24*365*10),"/","localhost",0);
setcookie ("last_currency_exchange_rate",$exchange_rate,time()+(60*60*24*365*10),"/","localhost",0);
The table has the fields: currencyid, currency, symbol, exchangerate.
Thanks for your great help