$_POST empty or not

Use empty($_POST) instead of an if containing $_POST[0] == "". This gave me a lot of trouble to find out why there wasn’t anything sent by my mailer, who can receive variables using both GET and POST. Oops! :S

This is valid obviously for any associative Array. 😉

– the empty() function documentation