are there other behaviors on the page like an insert record behavior? If so make sure the other behaviors do not have a redirect set.
also, check for php errors by adding the following code at line 1 of the page:
<?php
error_reporting(E_ALL);
ini_set('display_errors','on');
?>
if you need further help, please send a copy of the page in a zip archive so I can see the entire page code in context.