i have a script dat goes this way
...
foreach($_GET as $k => $gv) {
$$k = stripslashes(trim($gv));
}
if(!$pg){
$pg = 1;
setcookie('query', $q);
}
...
however i got the error: Warning: Cannot modify header information - headers already sent by (output started at /var/ in /var/ on line 12
line 12 is this :setcookie('query', $q);
any idea wat could be wrong?
...
foreach($_GET as $k => $gv) {
$$k = stripslashes(trim($gv));
}
if(!$pg){
$pg = 1;
setcookie('query', $q);
}
...
however i got the error: Warning: Cannot modify header information - headers already sent by (output started at /var/ in /var/ on line 12
line 12 is this :setcookie('query', $q);
any idea wat could be wrong?