You are here: Re: $request problem « PHP Programming Language « IT news, forums, messages
Re: $request problem

Posted by Richard Levasseur on 03/11/06 03:23

Not quotes a string index generates an E_NOTICE or something, i forget
which exactly, normally error reporting isn't set to show it. PHP
tries to resolve it as a define()'d constant, then treats it as a
quoted string. Not quoting the string index is generally bad form.

Single quotes provide a small performance gain as php doesn't try to
interpret the string.

For the question at hand:
I'm fairly sure that the callback has to be quoted, when using array
map, that may be the problem. Why are you individually escaping each
'word' of the input? Wouldn't it be easier to just apply it to the
entire $_REQUEST['input'] string?

$queries = array_map( 'mysql_real_escape_string', explode(" ",
$_REQUEST["input"]));

 

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

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