note 85446 deleted from function.mysql-real-escape-string by felipe

From: Date: Tue, 02 Sep 2008 11:26:15 +0000
Subject: note 85446 deleted from function.mysql-real-escape-string by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-144076@lists.php.net to get a copy of this message
Note Submitter: Anonymous ---- Hi, i am using a Linux server with php 5 and i made a function to prevent xss and sql injections... in a text box... Please tell me if you suggest me somethink better than this... function secureScript($value){ $value = strip_tags($value); if(get_magic_quotes_gpc()){ $value = stripslashes($value); } $value = mysql_real_escape_string($value, $link); return $value; } :)

« previous php.notes (#144076) next »