I had data in mysql, where it does not need any security.
I had a sql query string to get the data out every time using mysql_fetch_assoc.
So, I planed to store data in users browser.To reduce no of quires to sql.
if (!isset($_COOKIE['countries'])){
$query = "SELECT iso,name FROM sel_country";
$countries = mysql_query($query);
setcookie('countries', serialize($countries), time()+3600);
}else{
$countries = $unserialize($_COOKIE['countries']);
}
while ($row = mysql_fetch_assoc($countries)) {echo $row['name']}
But, When cookie is set it is showing following error
Fatal error: Function name must be a string in /home/worlds/public_html/index/ctrl.php on line 15
My cookie in browser displaying content as i%3A0%3B
Please help me out, how should i go?