It is important to realize
that what we see as equal is not necessarily equal.
Following submitted emailaddresses are one and the same
but still it can pass into a UNIQUE db field
and cause 3 duplicates.
The solution is this function [man]trim[/man]
<?php
// As entered in POST form:
$email = 'myname@somesite.com'
$email = ' myname@somesite.com'
$email = ' myname@somesite.com '
// SPACE is a character with ASCII code 32
// So those 3 submissions, strings, are unique, not equal
// The solution when validate and get data from $_POST
$email = trim($_POST); // Removes any leading and trailing SPACES
?>