Thanks for this small guide, it's helped me further understand some aspects of PHP, I'm still a newbie at this, and I'm hoping to develop using simplistic guides & the use of the php.net manual -- That's great.
PHP stood for "Personal Home Page" until the end of PHP version 3 or so, when Zend took over the majority of it's development. Presently it's the recursive acronym "PHP: Hypertext Preprocessor", or something like that.
As far as learning PHP, once I had the basics of the language down I started looking at some commonly used open source projects such as PhpMyAdmin, PhpSysInfo, and Wordpress. I tried to think of a very simple fix/refactor/new feature and I spent a weekend trying to implement it.
You can just do $_SERVER['REMOTE_ADDR'];
isset and getenv will only slow it down, $_SERVER and getenv do just the same, the only difference is that you can do getenv('remote_addr') but function call is slower than array call (#micro optimization)
Originally Posted by risoknop
First of all, I suggest abiding to some coding standards and/or best practices, one line condition statements for example aren't recommended.
Secondly, you should use enctype attribute with HTML forms for security reasons, for instance:
Great tutorial you have posted and some very knowledgeable replies to go with it. Even if you know PHP, it is still nice to refresh your mind once in a while to remember everything about it. Some very good points made for sure.