My guess is that you edited both images (maybe to crop them?) but in different ways somehow. Analysis of the 2 images shows me that the "good" image has the necessary "orientation" data embedded so that it can be automatically rotated to the proper position (presumably by the forum software). The "bad" image has no embedded information, so it comes out in the default orientation, which happens to look bad for the situation (camera orientation when taking photo, etc).
As DILLARD000 suggested, a good image-processing program should be able to fix the image rotation. Or, failing that, figure out what you might have done differently that stripped the embedded information from one image but not the other.