SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard johnn's Avatar
    Join Date
    Mar 2001
    Location
    Southern California, USA
    Posts
    1,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  2. #2
    SitePoint Wizard edshuck's Avatar
    Join Date
    Jul 2000
    Posts
    1,200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi

    I am not using PHPLIB template. So lets move this back to the top and try for a response.

    Anyone help?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •