Originally Posted by horizon
Nice block from SNC. However, I'd state this line:
$ip = getenv("REMOTE_ADDR");
$ip = (isset($_SERVER['REMOTE_ADDR'])) ? $_SERVER['REMOTE_ADDR'] : getenv("REMOTE_ADDR");
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:
<form enctype="application/x-www-form-urlencoded" method="post" action="/controller/action">
This is false as well, this enctype is default one so you don't have to specify it only if you need something different. The less text in your html the smaller so faster.