Tail Lights Screwy

does any1 have this problem…

k when i turn on ignition, and with the parkin brake applied, i turn on the lights and the taillights will come on… but as soon as i put the parking brakes down, the taillights turn off and never come back on again

and sometimes it just turns on with/without the parking brake applied while the engine is running… i’ve been stopped 3 times by the cops now and so far they let me off… does any1 know whats wrong? how to fix? any help would be appreciated

thanx