geroido Posted August 15, 2008 Share Posted August 15, 2008 Hi I get this error a bit but still haven't learned how to solve it. Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\pastelco\foodOrdsByDate.php:35) in C:\xampp\htdocs\pastelco\foodOrdsByDate.php on line 237 Can you help?. I'm just a beginner but my code is as follows. I've put question marks beside line 35 and line 237 to highlight where the error is. <?php session_start(); include("config.php"); // connect to the mysql server $link = mysql_connect($server, $db_user, $db_pass) or die ("Could not connect to mysql because ".mysql_error()); // select the database mysql_select_db($database) or die ("Could not select database because ".mysql_error()); $_SESSION['daychosen'] = $_GET['d']; $str = $_SESSION['mon']; if (isset($_SESSION['mon'])) { $thisday = $_SESSION['daychosen']; if ($thisday < 10) { $thisday = "0" . $thisday; } $str = substr($str, 0, 1); if ($str == "0") { $str = $_SESSION['mon']; }else{ $str = "0" . $_SESSION['mon']; } $fulldate = $_SESSION['year'] . "-" . $str . "-" . $thisday; $thisdate = date("Y-m-d"); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> ???????????????????????????????????????????????????????????????????????????????????????? <link href="cal.css" rel="stylesheet" type="text/css" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Pastel Co. by Free Css Templates</title> <link href="default.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="header"> <div id="logo"> <h1><a href="#">Pastel Co.</a></h1> <h2><a href="http://www.freecsstemplates.org/">By Free CSS Templates</a></h2> </div> <div id="menu"> <ul> <li class="active"><a href="#" title="">Homepage</a></li> <li><a href="#" title="">About Us</a></li> <li><a href="#" title="">Products</a></li> <li><a href="#" title="">Clients</a></li> <li><a href="logout.php" title="">Logout</a></li> </ul> </div> </div> <div id="content"> <div id="sidebar"> <div id="support"> <h2>Client Support</h2> <h3>05991-64809</h3> </div> <div id="login" class="boxed"> <h2 class="title">Client Administration</h2> <div class="content"> <form id="form1" method="post" action="clientpage.php"> <fieldset><? print $_SESSION['type']; if ($_SESSION['type'] == "Off Lisc") { ?><form id="form1" method="post" action="clientpage.php"> <fieldset> <?print $_SESSION['type'];?> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Current drinks orders" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Orders by date" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Add drinks item" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Edit stock item" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="View customers" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="View revenue" /> </fieldset> </form><? } elseif ($_SESSION['type'] == "Delivery and restaurant booking") { ?><form id="form1" method="post" action="clientpage.php"> <fieldset> <?print $_SESSION['type'];?> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Current orders" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Orders by date" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Add menu item" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Edit menu" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="View todays bookings" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Bookings by date" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="View customers" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="View revenue" /><? } elseif ($_SESSION['type'] == "Delivery only") { ?><form id="form1" method="post" action="clientpage.php"> <?print $_SESSION['type'];?> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Current orders" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Orders by date" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Add menu item" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Edit menu" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="View customers" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="View revenue" /><? } else { ?><form id="form1" method="post" action="clientpage.php"> <?print $_SESSION['type'];?> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Update seating" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="View todays bookings" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Bookings by date" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="View customers" /> <fieldset> </fieldset> </form> <?}?> </div> </div> <div id="updates" class="boxed"> <h2 class="title">Our job...</h2> <div class="content"> <ul> <li> <h3>Home delivery</h3> <p>Deliscious, piping hot meals delivered right to your doorstep.</p> </li> <li> <h3>Fast delivery</h3> <p>You can expect your orders to be delivered in double quick time. This is a pledge of our participating outlets.</p> </li> <li> <h3>Competitive prices</h3> <p>Our outlets strive to ensure highly competitve pricing.</p> </li> <li> <h3>Quality assurance</h3> <p>The best quality ingredients are sourced to create fantastic dishes.</p> </li> <li> <h3>Interactivity</h3> <p>An interactive website for users and clients.</p> </li> </ul> </div> </div> </div> <div id="main"> <div id="welcome" class="post"> <h2 class="title">Welcome <FONT color=#0066cc><?print $_SESSION['username']?></FONT> to Online Ordering!</h2><BR> <h3 class="date"><span class="month"><?echo date("l, F d, Y h:i" ,time());?></h3><BR> <div class="meta"> <? if (($_SESSION['type'] == "Delivery and restaurant booking") || ($_SESSION['type'] == "Delivery only") || ($_SESSION['type'] == "Restaurant booking only")) { unset($_SESSION['mon']); $today = date("Y-m-d"); $query = "SELECT DISTINCT(orderdetails.Ordernum), orderdetails.CustFName, orderdetails.CustSName, orderdetails.StreetAddr, orderdetails.Town, orderdetails.County, orderdetails.orddate, orderdetails.status, orderdetails.ordtime, ClientID from orderdetails, menuitemdetails where orderdetails.MenuItemID=menuitemdetails.MenuItemID and ClientID = '".$_SESSION['userid']."' and orderdetails.orddate = '$fulldate' and orderdetails.status = 'open' group by orderdetails.Ordernum order by orderdetails.ordtime"; $results = mysql_query($query, $link) or die("Sorry, but you have no orders for today"); if(mysql_num_rows($results) > 0){ ?><TABLE border=2><TR><TD><Font size=3 color="black">SELECT AN ORDER</TD><TD><Font size=3 color="black">ORDER NUMBER</TD></FONT><TD><Font size=3 color="black">CUSTOMER NAME</FONT></TD><TD><Font size=3 color="black">ORDER DATE</TD></FONT><TD><Font size=3 color="black">ORDER TIME</TD></FONT></TR><? while($row = mysql_fetch_object($results)){ ?><form id="form1" method="GET" action="dispfood_ordsbydate.php"><? echo ("<tr>"); echo ("<td>"); echo "<a href='dispfood_ordsbydate.php?ordID=" .$row->Ordernum. "'>View this order</a>"; echo ("</td>"); echo ("<td>"); echo $row->Ordernum; echo ("</td>"); echo ("<td>"); echo $row->CustFName . " " .$row->CustSName; echo ("</td>"); echo ("<td>"); echo $row->orddate; echo ("</td>"); echo ("<td>"); echo $row->ordtime; echo ("</td>"); echo("</tr>"); echo("</form>"); } } else{ echo("<i>There are no orders for $fulldate</i>"); } } ?> </table><? } else{ header( 'Location: http://localhost/pastelco/calendar.php' ) ; } if ($_SESSION['type'] == "Off Lisc") { unset($_SESSION['mon']); $today = date("Y-m-d"); $query = "SELECT DISTINCT(drinkorders.Ordernum), drinkorders.CustFName, drinkorders.CustSName, drinkorders.StreetAddr, drinkorders.Town, drinkorders.County, drinkorders.orddate, drinkorders.status, drinkorders.ordtime, clientID from drinkorders, drinks where drinkorders.drItemId=drinks.ItemID and clientID = '".$_SESSION['userid']."' and drinkorders.orddate = '$fulldate' and drinkorders.status = 'open' group by drinkorders.Ordernum order by drinkorders.ordtime"; $results = mysql_query($query, $link) or die("Sorry, but you have no orders for today"); if(mysql_num_rows($results) > 0){ ?><TABLE border=2><TR><TD><Font size=3 color="black">SELECT AN ORDER</TD><TD><Font size=3 color="black">ORDER NUMBER</TD></FONT><TD><Font size=3 color="black">CUSTOMER NAME</FONT></TD><TD><Font size=3 color="black">ORDER DATE</TD></FONT><TD><Font size=3 color="black">ORDER TIME</TD></FONT></TR><? while($row = mysql_fetch_object($results)){ ?><form id="form1" method="GET" action="dispfood_ordsbydate.php"><? echo ("<tr>"); echo ("<td>"); echo "<a href='dispfood_ordsbydate.php?ordID=" .$row->Ordernum. "'>View this order</a>"; echo ("</td>"); echo ("<td>"); echo $row->Ordernum; echo ("</td>"); echo ("<td>"); echo $row->CustFName . " " .$row->CustSName; echo ("</td>"); echo ("<td>"); echo $row->orddate; echo ("</td>"); echo ("<td>"); echo $row->ordtime; echo ("</td>"); echo("</tr>"); echo("</form>"); } } else{ echo("<i>There are no orders for $fulldate</i>"); } ?> </table><? } else{ header( 'Location: http://localhost/pastelco/calendar.php' ) ; ?????????????????????????????????????????? } ?> </div> </div> </div> </div> <div id="footer"> <p id="legal">Copyright © 2007 Pastel Co.. All Rights Reserved. Designed by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p> <p id="links"><a href="#">Privacy Policy</a> | <a href="#">Terms of Use</a></p> </div> </body> </html> Quote Link to comment Share on other sites More sharing options...
ratcateme Posted August 15, 2008 Share Posted August 15, 2008 you have created ouput by having html outside of the php tags. and once output has been created you cannot send out more header commands because headers have to go above any output. so move your code around so all your output is after all your header calls Scott. Quote Link to comment Share on other sites More sharing options...
geroido Posted August 15, 2008 Author Share Posted August 15, 2008 Sorry, I'm not sure I understand. Should I enclose all my HTML inside the php. Can you show me an example? Quote Link to comment Share on other sites More sharing options...
ratcateme Posted August 15, 2008 Share Posted August 15, 2008 the problem with your script is that it creates output before it finishes sending out headers the easiest but not very good way around this is to put this at the top of your script after the first opening <?php tag <?php //first line ob_start() //second line //rest of your script as it is ob_end_flush() // second to last line ?> // last line Scott. Quote Link to comment Share on other sites More sharing options...
geroido Posted August 15, 2008 Author Share Posted August 15, 2008 No luck with that I'm afraid. I forgot to mention that my page is working. It's just that the error message is appearing on the page. Quote Link to comment Share on other sites More sharing options...
ratcateme Posted August 15, 2008 Share Posted August 15, 2008 can you repost your code with my mods included Scott. Quote Link to comment Share on other sites More sharing options...
Nandini Posted August 15, 2008 Share Posted August 15, 2008 Put ob_start(); at the starting line and put ob_end_flush(); at the end of the line Ur problem will be resolved. Quote Link to comment Share on other sites More sharing options...
ratcateme Posted August 15, 2008 Share Posted August 15, 2008 so you still get the same errors? Scott. Quote Link to comment Share on other sites More sharing options...
geroido Posted August 15, 2008 Author Share Posted August 15, 2008 Heres the mods. Thanks <?php ob_start(); //second line session_start(); include("config.php"); // connect to the mysql server $link = mysql_connect($server, $db_user, $db_pass) or die ("Could not connect to mysql because ".mysql_error()); // select the database mysql_select_db($database) or die ("Could not select database because ".mysql_error()); $_SESSION['daychosen'] = $_GET['d']; $str = $_SESSION['mon']; if (isset($_SESSION['mon'])) { $thisday = $_SESSION['daychosen']; if ($thisday < 10) { $thisday = "0" . $thisday; } $str = substr($str, 0, 1); if ($str == "0") { $str = $_SESSION['mon']; }else{ $str = "0" . $_SESSION['mon']; } $fulldate = $_SESSION['year'] . "-" . $str . "-" . $thisday; $thisdate = date("Y-m-d"); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link href="cal.css" rel="stylesheet" type="text/css" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Pastel Co. by Free Css Templates</title> <link href="default.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="header"> <div id="logo"> <h1><a href="#">Pastel Co.</a></h1> <h2><a href="http://www.freecsstemplates.org/">By Free CSS Templates</a></h2> </div> <div id="menu"> <ul> <li class="active"><a href="#" title="">Homepage</a></li> <li><a href="#" title="">About Us</a></li> <li><a href="#" title="">Products</a></li> <li><a href="#" title="">Clients</a></li> <li><a href="logout.php" title="">Logout</a></li> </ul> </div> </div> <div id="content"> <div id="sidebar"> <div id="support"> <h2>Client Support</h2> <h3>05991-64809</h3> </div> <div id="login" class="boxed"> <h2 class="title">Client Administration</h2> <div class="content"> <form id="form1" method="post" action="clientpage.php"> <fieldset><? print $_SESSION['type']; if ($_SESSION['type'] == "Off Lisc") { ?><form id="form1" method="post" action="clientpage.php"> <fieldset> <?print $_SESSION['type'];?> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Current drinks orders" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Orders by date" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Add drinks item" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Edit stock item" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="View customers" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="View revenue" /> </fieldset> </form><? } elseif ($_SESSION['type'] == "Delivery and restaurant booking") { ?><form id="form1" method="post" action="clientpage.php"> <fieldset> <?print $_SESSION['type'];?> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Current orders" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Orders by date" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Add menu item" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Edit menu" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="View todays bookings" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Bookings by date" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="View customers" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="View revenue" /><? } elseif ($_SESSION['type'] == "Delivery only") { ?><form id="form1" method="post" action="clientpage.php"> <?print $_SESSION['type'];?> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Current orders" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Orders by date" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Add menu item" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Edit menu" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="View customers" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="View revenue" /><? } else { ?><form id="form1" method="post" action="clientpage.php"> <?print $_SESSION['type'];?> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Update seating" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="View todays bookings" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="Bookings by date" /> <BR><input id="inputsubmit1" type="submit" name="inputsubmit1" value="View customers" /> <fieldset> </fieldset> </form> <?}?> </div> </div> <div id="updates" class="boxed"> <h2 class="title">Our job...</h2> <div class="content"> <ul> <li> <h3>Home delivery</h3> <p>Deliscious, piping hot meals delivered right to your doorstep.</p> </li> <li> <h3>Fast delivery</h3> <p>You can expect your orders to be delivered in double quick time. This is a pledge of our participating outlets.</p> </li> <li> <h3>Competitive prices</h3> <p>Our outlets strive to ensure highly competitve pricing.</p> </li> <li> <h3>Quality assurance</h3> <p>The best quality ingredients are sourced to create fantastic dishes.</p> </li> <li> <h3>Interactivity</h3> <p>An interactive website for users and clients.</p> </li> </ul> </div> </div> </div> <div id="main"> <div id="welcome" class="post"> <h2 class="title">Welcome <FONT color=#0066cc><?print $_SESSION['username']?></FONT> to Online Ordering!</h2><BR> <h3 class="date"><span class="month"><?echo date("l, F d, Y h:i" ,time());?></h3><BR> <div class="meta"> <? if (($_SESSION['type'] == "Delivery and restaurant booking") || ($_SESSION['type'] == "Delivery only") || ($_SESSION['type'] == "Restaurant booking only")) { unset($_SESSION['mon']); $today = date("Y-m-d"); $query = "SELECT DISTINCT(orderdetails.Ordernum), orderdetails.CustFName, orderdetails.CustSName, orderdetails.StreetAddr, orderdetails.Town, orderdetails.County, orderdetails.orddate, orderdetails.status, orderdetails.ordtime, ClientID from orderdetails, menuitemdetails where orderdetails.MenuItemID=menuitemdetails.MenuItemID and ClientID = '".$_SESSION['userid']."' and orderdetails.orddate = '$fulldate' and orderdetails.status = 'open' group by orderdetails.Ordernum order by orderdetails.ordtime"; $results = mysql_query($query, $link) or die("Sorry, but you have no orders for today"); if(mysql_num_rows($results) > 0){ ?><TABLE border=2><TR><TD><Font size=3 color="black">SELECT AN ORDER</TD><TD><Font size=3 color="black">ORDER NUMBER</TD></FONT><TD><Font size=3 color="black">CUSTOMER NAME</FONT></TD><TD><Font size=3 color="black">ORDER DATE</TD></FONT><TD><Font size=3 color="black">ORDER TIME</TD></FONT></TR><? while($row = mysql_fetch_object($results)){ ?><form id="form1" method="GET" action="dispfood_ordsbydate.php"><? echo ("<tr>"); echo ("<td>"); echo "<a href='dispfood_ordsbydate.php?ordID=" .$row->Ordernum. "'>View this order</a>"; echo ("</td>"); echo ("<td>"); echo $row->Ordernum; echo ("</td>"); echo ("<td>"); echo $row->CustFName . " " .$row->CustSName; echo ("</td>"); echo ("<td>"); echo $row->orddate; echo ("</td>"); echo ("<td>"); echo $row->ordtime; echo ("</td>"); echo("</tr>"); echo("</form>"); } } else{ echo("<i>There are no orders for $fulldate</i>"); } } ?> </table><? } else{ header( 'Location: http://localhost/pastelco/calendar.php' ) ; } if ($_SESSION['type'] == "Off Lisc") { unset($_SESSION['mon']); $today = date("Y-m-d"); $query = "SELECT DISTINCT(drinkorders.Ordernum), drinkorders.CustFName, drinkorders.CustSName, drinkorders.StreetAddr, drinkorders.Town, drinkorders.County, drinkorders.orddate, drinkorders.status, drinkorders.ordtime, clientID from drinkorders, drinks where drinkorders.drItemId=drinks.ItemID and clientID = '".$_SESSION['userid']."' and drinkorders.orddate = '$fulldate' and drinkorders.status = 'open' group by drinkorders.Ordernum order by drinkorders.ordtime"; $results = mysql_query($query, $link) or die("Sorry, but you have no orders for today"); if(mysql_num_rows($results) > 0){ ?><TABLE border=2><TR><TD><Font size=3 color="black">SELECT AN ORDER</TD><TD><Font size=3 color="black">ORDER NUMBER</TD></FONT><TD><Font size=3 color="black">CUSTOMER NAME</FONT></TD><TD><Font size=3 color="black">ORDER DATE</TD></FONT><TD><Font size=3 color="black">ORDER TIME</TD></FONT></TR><? while($row = mysql_fetch_object($results)){ ?><form id="form1" method="GET" action="dispfood_ordsbydate.php"><? echo ("<tr>"); echo ("<td>"); echo "<a href='dispfood_ordsbydate.php?ordID=" .$row->Ordernum. "'>View this order</a>"; echo ("</td>"); echo ("<td>"); echo $row->Ordernum; echo ("</td>"); echo ("<td>"); echo $row->CustFName . " " .$row->CustSName; echo ("</td>"); echo ("<td>"); echo $row->orddate; echo ("</td>"); echo ("<td>"); echo $row->ordtime; echo ("</td>"); echo("</tr>"); echo("</form>"); } } else{ echo("<i>There are no orders for $fulldate</i>"); } ?> </table><? } else{ header( 'Location: http://localhost/pastelco/calendar.php' ) ; } ob_end_flush(); // second to last line ?> </div> </div> </div> </div> <div id="footer"> <p id="legal">Copyright © 2007 Pastel Co.. All Rights Reserved. Designed by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p> <p id="links"><a href="#">Privacy Policy</a> | <a href="#">Terms of Use</a></p> </div> </body> </html> Quote Link to comment Share on other sites More sharing options...
ratcateme Posted August 15, 2008 Share Posted August 15, 2008 you need to put the ob_end_flush after all the html also add it like this at th end of your page <?php ob_end_flush(); ?> Scott. Quote Link to comment Share on other sites More sharing options...
Dathremar Posted August 15, 2008 Share Posted August 15, 2008 Check the included file if it outputs something on the page, also this problem is known as empty spaces problem so try to delete any empty space at beginning and at the end of the document. Also I had problem like this (was working in Dreamweaver) and it didnt display any empty spaces. I opened the same document in Notepad and did some deleting on the beginning and end of the page and suddenly the error was gone. My guess is that some editors have some kind of special chars that are not displayed. Hope it helps Quote Link to comment Share on other sites More sharing options...
geroido Posted August 15, 2008 Author Share Posted August 15, 2008 My script doesn't work at all with this code added. What exactly does this code do? My page is capturing a lot of variables. Is it clearing them? Quote Link to comment Share on other sites More sharing options...
geroido Posted August 15, 2008 Author Share Posted August 15, 2008 The include file seems to be ok. When you say whitespace do you mean actual blank lines between code? Quote Link to comment Share on other sites More sharing options...
geroido Posted August 15, 2008 Author Share Posted August 15, 2008 The strange thing about this page is I'm trying to handle two different types of user here depending on what category they are in - 'Lisc' or 'Delivery and restaurant booking etc.' If I remove the second if statement (if ($_SESSION['type'] == "Off Lisc")) and all the related code leaving just the first one then I get no error message and it all works well. It doesn't seem to like the second Header location statement on the page. I might seperate it into two sperate pages altogether. Quote Link to comment Share on other sites More sharing options...
compguru910 Posted August 15, 2008 Share Posted August 15, 2008 The ob_Start and ob_end_flush are object bufferes, meaning it gives you the ability to set and unset session variables after headers have been sent. The ob_start() and ob_end_flush() are not affecting your code negatively, they are doing what they are supposed to do. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.