Added sanitize function for SQLi prevention
Commented heavily