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.