yep platform collision code can have many problems. You wait until you add solid walls and ceilings you can hit your head on. Then slopes ... haha :-)
Why not try setting the new coords for the player when they move in a direction (keeping the old ones stored), then do a test for a tile on on both corners (and maybe the middle of the edge) in the direction they are moving. If a tile is detected, reset the coords. This will work for up/down/left/right etc. Also when falling, if you detect you have fallen "into" a tile, you can't just reset the y coord or you'll never land, you need to set the y coord so the player is perfectly on the tile and then change the player graphic to walking and play a landing sound.
Why not try setting the new coords for the player when they move in a direction (keeping the old ones stored), then do a test for a tile on on both corners (and maybe the middle of the edge) in the direction they are moving. If a tile is detected, reset the coords. This will work for up/down/left/right etc. Also when falling, if you detect you have fallen "into" a tile, you can't just reset the y coord or you'll never land, you need to set the y coord so the player is perfectly on the tile and then change the player graphic to walking and play a landing sound.