Hi there ~
I understand your concern and penis hurting while urinating may be due to a urinary tract infection
(UTI) or due to a sexually transmitted disease
) if you have been using needles etc that are not sterile or got a recent blood transfusion
. However a dermatological consultation might be in place for the rashes on your penis. In either case you would have to visit a doctor. If testing i.e. screening for STDs are normal and you do not have a UTI either you might have a benign or a malignant urological condition for which you need to visit with a urologist
. I hope this helps. Take care and have a lovely day!