Reply to Re: $_server[php_self]

Your name:

Reply:


Posted by Mike Willbanks on 09/20/05 04:45

Mikey P:
> hi all i'm having issues with this returned function. I can get it to
> delete a database but i really want it to grab the stateselect
> extention and grab all the cities related to that state. I wanted to
> contain this on one page instead of going over multiple pages which i
> can do. Sorry if this doesn't make much sense i'm a newbie.. below is
> the code. the isset($_get is where i have the issues. any help would
> be appreciated.


First off I wanted to suggest you do some reading on PHP Security as
your application falls victim to an input validation failure. Anytime
you get data from a user IE: $_GET, $_POST, $_COOKIE, $_REQUEST,
$_SERVER you need to check that the data you are getting is right...
Read the PHP Security Guide: http://phpsec.org/projects/guide/

Also your code is quite ugly... Work on formatting and not hiding
errors. Fix them first not hide them. In production you should log
your errors instead of allowing them to be displayed to the browser.
Also you only need to select the database once, and you should reuse
variables when they make sense to.

When inserting data into mysql use mysql_real_escape_string

Now onto fixing your code:
http://pastebin.com/368628


--
Mike Willbanks
Zend Certified Engineer
http://www.digitalstruct.com

[Back to original 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

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