I guess the basic question is: of the 200x180 pixels in the original image, how do you decide which pixels to cut and which to "shrink" to get a 120x120 image? You can use this function ( http://us3.php.net/manual/en/function.imagecopyresized.php
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions.
Consider email address RFCs:
Look at HTML5 form input element (with type=email) regex pattern: