Re: mysql_real_escape_string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ron,

One thing that you could do is name the variables as an array as opposed to creating a series of like-named variables.

Instead of:

<input  name="web_site_1" type="sometype" ../>
<input  name="web_site_2" type="sometype" ../>
<input  name="web_site_3" type="sometype" ../>
...
<input  name="web_site_11" type="sometype" ../>

Which would give:

$web_site_1
$web_site_2
$web_site_3
...
$web_site_11

You could set up the variables as:

<input name="web_site[1]" type="sometype".../>
<input name="web_site[2]" type="sometype".../>
<input name="web_site[3]" type="sometype".../>
...
<input name="web_site[11]" type="sometype".../>


This would give you a $web_site array which could then be looped through:

for($i = 0; $i < count($web_site);$i++)
{
	$web_site[$i] = mysql_real_escape_string($web_site[$i]);
}

Hope this helps and is what you are looking for....

Best regards,

Mike Weaver

--
Michael Weaver
Founder/Chief Facilitator
Dynamic Insight
Enhancing Professional Awareness &  Communication
Tel: 1.814.574.4871
Email: weaver@xxxxxxxxxxxxxxxxxx

The information in this email and subsequent attachments may contain
confidential information that is intended solely for the attention and use of the named addressee(s). This message or any part thereof must not be disclosed, copied, distributed or retained by any person without authorization from the addressee. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.





[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux