Re: Error(Newbie)

From: Date: Sun, 23 Jun 2002 06:50:41 +0000
Subject: Re: Error(Newbie)
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-103448@lists.php.net to get a copy of this message
I got that auto add slashes thing on. is it enough? If not how should I go about adding them? like this? $_SERVER['REMOTE_HOST'] = addslashes($_SERVER['REMOTE_HOST']); What sort of effects could an attack have? I am intergrating stats into a site. What other vars could I gather info from? Thanks, JJ Harrison webmaster@tececo.com www.tececo.com BTW I have fixed the error now. ----- Original Message ----- From: "1LT John W. Holmes" <holmes072000@charter.net> To: <webmaster@tececo.com>; <php-general@lists.php.net> Sent: Sunday, June 23, 2002 2:11 PM Subject: Re: [PHP] Error(Newbie) >$query = "INSERT INTO stats >(vid, id, ¶¤ >·)¸cö‰i9}è_vn, time, >host, referrer, browser) VALUES ('', '$id', '$_COOKIE >['tececo_stats']', '$time', >'$_SERVER['REMOTE_HOST']', '$_SERVER['HTTP_REFERER']', '$_SERVER >['HTTP_USER_AGENT']'); "; I hope you are using addslashes on your $_COOKIE and $_SERVER vars, too, otherwise your query is wide open to some attacks... ---John Holmes...

« previous php.general (#103448) next »