You are here: Re: the script wont work and i cant find anything wrong please help « PHP Programming Language « IT news, forums, messages
Re: the script wont work and i cant find anything wrong please help

Posted by Erwin Moller on 11/24/06 17:35

so many sites so little time wrote:

<snip>
> $query = "UPDATE home SET header='{$_POST['header']}',

This approach id possibly vunarable to SQL-injection.
That is bad.
NEVER trust data coming from GET, POST or COOKIE.

Possibly you have magic quotes enabled in php.ini, but you should at least
check for that.

It is much better to set up your applicatie right from the start than fixing
it afterward (after some funny guy gave the command to delete the database
by inserting that command in your 'header' variable).

Anybody who knows how SQL is formulated can come up with an SQL-injection
command. It is easy.

If you don't know what I am talking about (eg you don't know what magic
quotes are and how they change your data and WHY) then you better take a
break from developing your app and learn about that part first.

Regards,
Erwin Moller

 

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

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