Hmm, try thinking along the lines of what order you render the player and wall. I haven't tested this but you might want to do something like:
If Player.y > (wall.y - wall height) And player.y < wall.y And player.x > wall.x And player .x < (wall.x + wall width)
Render Player
Render Wall
Else
Render Wall
Render Player
EndIf
That's Psuedo Code by the way so it won't work in Dark BASIC, it's just a 'theory' in code. But yeah, check to see if it's within the wall's dimensions, if it is then render the wall AFTER the player so it's on top of it. Otherwise Render the wall first.
Hope you understand what I'm talking about, I haven't done too much 2d work recently so there could well and truly be an easier way. I'm not sure.
"Computers are useless they can only give you answers."