Hello,
I have this code:

switch($action)
{
case "change_password":
include("change_pwd.php");
break;
case "modify_settings":
include("modify_settings.php");
tpl_display_main();
break;
...
modify_settings.php will display user info by using PHPLIB Template to display html form for updating data which works OK. Then the user will enter the correct info and press submit button, and modify_settings.php will update database. The problem is it doesn't wait for user to press submit button. After display html form, it displays the html form in tpl_display_main() right away under the html form in modify_settings.php with some parts overlap each other.

I fix that by put "exit;" line after the codes that use template to display the html form in modify_settings.php, but why the "exit;" is neccessary? Is it the correct way to do?

(tpl_display_main() also uses template to display form)
Thanks in advance,,
john