lucy24 - 6:38 pm on May 4, 2012 (gmt 0)
Tangential but I gotta ask: Who is your audience? What happens if the user's last name is their maiden name, and possibly also their mother's maiden name?
$mainNameLine = "$firstname $maidenname $lastname ($username)";
$username = $firstname;
What's the value of $username before it gets redefined?