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="")
{
if ("cal"==$page && ("new"== $view || "update" == $view))
{
if ("new"==$view)
{
db_cal_entry($form_vars, $user);
}
else
{
db_cal_update($form_vars, $user);
}
$tdate = date("Y-n-j", strtotime($form_varsї"edate"]));
header("Location: staffpage.php?area=form&page=cal&view=day&id=".$tdate."&user=".$user);
exit();
}
do_html_header();
load_menu($user);
if ($page == "default")
{
load_default();
}
elseif ($page == "userform")
{
form_user($user, $id);
}
elseif ($page == "cal")
{
if($view == "yr")
{
form_cal_yr($id, $user);
}
elseif($view == "mth")
{
form_cal_mth($id, $user);
}
elseif($view == "day")
{
form_cal_day($id, $user, $eid);
}
}
do_html_footer();
}
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.