If you only have one form on each page, then it will direct to whatever page you have referenced as the "action" when you click submit. So the most likely problem is you've made a typo somewhere.
As Mick said, this isn't really the appropriate place to ask a PHP question as phpBB is only a software that is written in PHP - we're not a part of the PHP project itself
If you happen to be online now or in the next 15 minutes or so I'll help you fix your problem in real time on IRC though. Shoot me a PM.