Fixed it. It was in the php file, and i think this one can be blamed on dreamweaver. The file started on line 1 with no whitespace, but it kept kicking errors that line 1 started the output. So i coped the code, pasted into a new notepad file, saved it as php and uploaded it and viola, works great.
So i guess DW fucked it up somewhere cuz there was no WS but that was the problem. Fucking weird.