The syphilitic ulcer has a hard base which is non-tender, has a well-defined edge and will, with time, disappear on its own.
ulcer has a soft base, is quite tender and may look inflamed, and has ragged shaggy edges. You should not try to make this diagnosis yourself, but see a doctor, because if you have one std
the odds are good that you have more than one. Get tested.