Penile cancer can cause swelling at the head of the penis and foreskin, known as balanitis. Balanitis can cause a painful erection by trapping the head of the penis behind the foreskin. Other symptoms of penile cancer include lesions, ulcers, or wart-like growths on the penis, as well as a smelly discharge from under the foreskin.