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

Posted by Sjoerd on 06/20/06 17:07

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

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