I try to log certain input atempts.
when I use
it works fine
but when I define a function around it, then the $ua,$ref,$qs are empty in the database ????
I tried to define them global but that also didn't work
when I use
Code:
$ua=$HTTP_SERVER_VARS['HTTP_USER_AGENT'];
$qs=$_SERVER['QUERY_STRING'];
$ref=$_SERVER['HTTP_REFERER'];
$query="INSERT INTO SYSLOGTABLE(SLIP,SLHOST,SLDATE,SLUA,SLREFERER)
VALUES('$host','$ip','$datum','$ua','$ref')";
it works fine
but when I define a function around it, then the $ua,$ref,$qs are empty in the database ????
Code:
function test($conn){
$ua=$HTTP_SERVER_VARS['HTTP_USER_AGENT'];
$qs=$_SERVER['QUERY_STRING'];
$ref=$_SERVER['HTTP_REFERER'];
$query="INSERT INTO SYSLOGTABLE(SLIP,SLHOST,SLDATE,SLUA,SLREFERER)
VALUES('$host','$ip','$datum','$ua','$ref')";
}
I tried to define them global but that also didn't work