I am wanting to do something that seems very simple, yet I can't figure it out.
How do I pass control from one php module to another? I know how to call functions and that is not what I want.
What I find I do currently a lot is:
<?php
//... php code to do something in a database...
echo 'processing completed successfully<br>';
echo '<a href="mainmenu.php">Continue</a>';
?>
Rather than send control back for an confirmation, I just want to run my mainmenu.php module. I tried
header ("Location:mainmenu.php");
But I get an error message about having sent headers. Any help is greatly appreciated.