Lamez Posted July 14, 2008 Share Posted July 14, 2008 Nothing in my code is being echoed out. I have no clue why. My head shows, but not my html or my footer. It works on other pages of my website. Here is the code: <?php ob_start(); $path = "../../"; $title = "Change Marquee"; $rank = "yes"; include ($path."main/include/cons/head.php"); if($session->logged_in){ if($session->isAdmin()){ $q = mysql_query("SELECT * FROM `marquee`"); $row = mysql_fetch_array($q) or die(mysql_error()); $num_rows = mysql_num_rows($q); if($num_rows < 1){ $auto = '1'; }else{ $auto = $row['auto']; } $type = $row['num']; $id = $row['id']; $basket = $row['mar_basket']; $foot = $row['mar_foot']; $nu = $row['mar_nu']; $custom = $row['mar_custom']; if ($auto == ('1')){ $q = mysql_query("SELECT * FROM `site_status`"); $row = mysql_fetch_array($q); $stat = $row['status']; //0 nutral, 1 = basket, 2 = football $auto_yes = "checked"; $auto_no = ""; if ($type == ('3')){ $mar_basket = ""; $mar_foot = ""; $mar_nu = ""; $mar_custom = "checked"; $mar_none = ""; } if ($type == ('4')){ $mar_basket = ""; $mar_foot = ""; $mar_nu = ""; $mar_custom = ""; $mar_none = "checked"; } if ($stat == ('0')){ $mar_basket = ""; $mar_foot = ""; $mar_nu = "checked"; $mar_custom = ""; $mar_none = ""; } if ($stat == ('1')){ $mar_basket = "checked"; $mar_foot = ""; $mar_nu = ""; $mar_custom = ""; $mar_none = ""; } if ($stat == ('2')){ $mar_basket = ""; $mar_foot = "checked"; $mar_nu = ""; $mar_custom = ""; $mar_none = ""; } }else{ $auto_no = "checked"; //0 = nutral, 1 = basket, 2 = football, 3 = custom, 4 = none if ($type == ('0')){ $mar_basket = ""; $mar_foot = ""; $mar_nu = "checked"; $mar_custom = ""; $mar_none = ""; } if ($type == ('1')){ $mar_basket = "checked"; $mar_foot = ""; $mar_nu = ""; $mar_custom = ""; $mar_none = ""; } if ($type == ('2')){ $mar_basket = ""; $mar_foot = "checked"; $mar_nu = ""; $mar_custom = ""; $mar_none = ""; } if ($type == ('3')){ $mar_basket = ""; $mar_foot = ""; $mar_nu = ""; $mar_custom = "checked"; $mar_none = ""; } if ($type == ('4')){ $mar_basket = ""; $mar_foot = ""; $mar_nu = ""; $mar_custom = ""; $mar_none = "checked"; } } ?> <p class="header">Change Marquee</p> <p class="maintext"> <form id="form1" name="form1" method="post" action="ch_mar_up.php"> <table width="100%" border="0"> <tr> <td>Update Automatically</td> <td width="7%"> <label> <input type="radio" name="auto" id="radio5" value="yes" <?php echo $auto_yes; ?>> </label> Yes</td> <td width="76%"> <label> <input type="radio" name="auto" id="radio6" value="no" <?php echo $auto_no; ?>> </label> No</td> </tr> <tr> <td width="17%"><label> <input type="radio" name="mar" id="radio" value="bakset" <?php echo $mar_basket; ?>> Basketball</label></td> <td colspan="2"><label> <input name="basket" type="text" id="basket" value="<?php echo $basket; ?>" size="150" /> </label></td> </tr> <tr> <td><label> <input type="radio" name="mar" id="radio2" value="foot" <?php echo $mar_foot; ?>> Football</label></td> <td colspan="2"><input name="foot" type="text" id="foot" value="<?php echo $foot; ?>" size="150" /></td> </tr> <tr> <td><label> <input type="radio" name="mar" id="radio7" value="nu" <?php echo $mar_nu; ?>> Neutral </label></td> <td colspan="2"><input name="nu" type="text" id="nu" value="<?php echo $nu; ?>" size="150" /></td> </tr> <tr> <td><label> <input type="radio" name="mar" id="radio3" value="custom" <?php echo $mar_custom; ?>> Custom</label></td> <td colspan="2"><input name="custom" type="text" id="custom" value="<?php echo $custom; ?>" size="150" /></td> </tr> <tr> <td><label> <input type="radio" name="mar" id="radio4" value="none" <?php echo $mar_none; ?>> None</label></td> <td colspan="2"><label> <input type="submit" name="button" id="button" value="Update" /> </label></td> </tr> </table> </form> </p> <?php }else{ header('Location: '.$path.'index.php'); } }else{ header('Location: '.$path.'index.php'); } include ($path."main/include/cons/foot.php"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/114687-nothing-being-echoed-out/ Share on other sites More sharing options...
.josh Posted July 14, 2008 Share Posted July 14, 2008 so..where are $session->logged_in and $session->isAdmin being assigned? In head.php? Or are those global session vars? If so, you need session_start() at the top of your page. Also if that's how you're doing sessions then you must have register globals set to ON which you don't want to be doing. Quote Link to comment https://forums.phpfreaks.com/topic/114687-nothing-being-echoed-out/#findComment-589779 Share on other sites More sharing options...
Lamez Posted July 14, 2008 Author Share Posted July 14, 2008 That is all defined in a include page in the head. That is not the problem because I have that on my most of my pages. I am not too sure what it is. Quote Link to comment https://forums.phpfreaks.com/topic/114687-nothing-being-echoed-out/#findComment-589783 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.