I Have one registration and payment page. program flow is like registration > confirmation > payment. After validation and calculation in registration page need to go to confirm
use ob_end_flush() at the end. This should work like charm.
ob_end_flush()