You are here: Re: Submit form with empty data « All PHP « IT news, forums, messages
Re: Submit form with empty data

Posted by robert on 09/28/86 11:47

<snip>

| I offered the "magic code"
| alternative as a way for him to avoid modifying code he was unsure
| about.

again, magic code is NEVER a good plan, strategy, or methodology for any
programming endeavor. and what's worse is that you are encouraging this kind
of bad behavior/habit in someone whom you believe is completely new
tocoding. that's worse than bad form!

the IDEAL solution would be to handle this in the sql statement and NOT the
code...like:


SELECT *
FROM foo
WHERE fieldSearched = '$valueToFind'
AND '$valueToFind' != ''

problem solved!

 

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

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