Revisited editprofile.php, now with better validation and error handling. If input fields are left empty the empty data is now also sent to the server.