Page 2 of 2

Posted: Thu Aug 22, 2002 11:27 am
by volka
then check what's on line 133 of /usr/home/faog/staffpages/staffpage_fns.php that prevents line 54 in /usr/home/faog/staffpages/staffpage_fns.php from sending header information ;)

Just remember that even a blank line outside the <?php ?> tag is output

Posted: Thu Aug 22, 2002 11:37 am
by nielsene
OK then its the common problem after all. If you want to avoid using output buffering, you could restructure your tests so that you test for new/update first and then after you know you aren't redirectly, start outputting stuff. Something like

Code: Select all

function do_pages($area, $page="default", $view="", $user="", $id="", $eid="", $form_vars="") 
&#123; 
   if ("cal"==$page && ("new"== $view || "update" == $view))
   &#123;
        if ("new"==$view)
        &#123;
            db_cal_entry($form_vars, $user); 
        &#125;
        else
        &#123;
            db_cal_update($form_vars, $user); 
        &#125;
     $tdate = date("Y-n-j", strtotime($form_vars&#1111;"edate"]));       
     header("Location: staffpage.php?area=form&page=cal&view=day&id=".$tdate."&user=".$user);
     exit(); 
   &#125;
   do_html_header(); 
   load_menu($user);
   if ($page == "default") 
  &#123;
     load_default(); 
  &#125;
  elseif ($page == "userform") 
  &#123;
     form_user($user, $id); 
    &#125;
  elseif ($page == "cal") 
  &#123; 
     if($view == "yr") 
     &#123;
        form_cal_yr($id, $user); 
     &#125;
     elseif($view == "mth") 
     &#123;
         form_cal_mth($id, $user);
     &#125; 
     elseif($view == "day") 
     &#123;
          form_cal_day($id, $user, $eid);
      &#125;
  &#125;     
  do_html_footer(); 
    
&#125;
You'll still have to make sure that you don't have any stray newlines as volka mentions anywhere outside of <?php ?> blocks.

Posted: Thu Aug 22, 2002 11:49 am
by matthiasone
Well I changed the code and now I am getting a completely blank page and still getting the error message.

I check the line numbers the one said to start the output doesn't show up in my editor but is the line below it.