You are here: Re: Quick Sql Injection question..... « PHP Programming Language « IT news, forums, messages
Re: Quick Sql Injection question.....

Posted by toddism on 06/20/06 17:35

Thank you much. I assumed it was OK but wasn't sure if there was
something subtle.

Sjoerd wrote:
> toddism wrote:
> > $clean = array();
> > $mysql = array();
> >
> > $clean['last_name']="o'reilly";
> > $mysql['last_name']=mysql_real_escape_string($clean['last_name']);
> >
> >
> > why are we using an array ( $mysql['last_name'] ) instead of just a
> > variable: $val?
>
> It will work with just a variable. An array is probably used because
> you want to insert more than only the last name:
>
> $clean = array("last_name" => "o'reilly", "first_name" => "Bill", "And"
> => "so on");
> $mysql = array();
> foreach ($clean as $key -> $value) {
> $myqsl[$key] = mysql_real_escape_string($value);
> }

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация