Re: mysql_real_escape_string

From: Date: Sat, 17 Feb 2007 10:03:59 +0000
Subject: Re: mysql_real_escape_string
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-43095@lists.php.net to get a copy of this message
Ron Piggott wrote:
I am creating a form where I am using $web_site_# for the various fields. At the present time there are 11 fields I am asking the user to key in. I am wondering if there is a slick way to use the mysql_real_escape_string command with this so $web_site_1 = mysql_real_escape_string($web_site_1); $web_site_2 = mysql_real_escape_string($web_site_2); $web_site_3 = mysql_real_escape_string($web_site_3); ... $web_site_11 = mysql_real_escape_string($web_site_11); would be replaced by some type of loop for ($i=1;$i<=11;$i++) ${"web_site_$i"}=mysql_real_escape_string(${"web_site_$i"}};


« previous php.db (#43095) next »