Xyphon Posted December 14, 2007 Share Posted December 14, 2007 <?PHP include('Connect.php'); include('top.php'); $result = mysql_query("SELECT * FROM news_comments"); echo "<table border='1'> <tr> <th>Hi,<br /> It's Xyphon. I have just made the news page, I hope you like it! Please, leave comments here!</th> </tr></table>"; echo "<table border='1' width='500'>"; echo "<tr> <td> <a href='postcomment.php'>Post Comment</a></td>"; echo "<td> <a href='viewcomments.php'>View Comments</a></td></tr></table>"; if(!$row = mysql_fetch_array($result)) echo "There are no current comments. Layout issues may accure."; else { echo "<table border='1' width='500' height='20'>"; echo "<br /><br />"; echo "<tr>"; echo "<td><center><b>Username: </b><br />" . $row['username'] . "</center></td>"; echo "<td><center><b>ID: </b><br />" . $row['user_id'] . "</center></td></tr></table>"; echo "<table border='1' width='500' height='20'><tr><td><b>Comment:</b>"; echo "<td>" . $row['comment'] . "</td>"; echo "</tr>"; } echo "</table>"; include('bottom.php'); ?> for some reason if there are no comments, it displays bottom.php at like, the bottom of the page, not the right. Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 14, 2007 Share Posted December 14, 2007 Its the way your layout is setup, use something to cover it up when there are no comments Replace This Line if(!$row = mysql_fetch_array($result)) echo "There are no current comments. Layout issues may accure."; else { echo "<table border='1' width='500' height='20'>"; echo "<br /><br />"; echo "<tr>"; echo "<td><center><b>Username: </b><br />" . $row['username'] . "</center></td>"; echo "<td><center><b>ID: </b><br />" . $row['user_id'] . "</center></td></tr></table>"; echo "<table border='1' width='500' height='20'><tr><td><b>Comment:</b>"; echo "<td>" . $row['comment'] . "</td>"; echo "</tr>"; } TO if(mysql_num_rows($result)==0){ echo "There are no current comments. Layout issues may accure."; } else { while($row = mysql_fetch_array($result)){ echo "<table border='1' width='500' height='20'>"; echo "<br /><br />"; echo "<tr>"; echo "<td><center><b>Username: </b><br />" . $row['username'] . "</center></td>"; echo "<td><center><b>ID: </b><br />" . $row['user_id'] . "</center></td></tr></table>"; echo "<table border='1' width='500' height='20'><tr><td><b>Comment:</b>"; echo "<td>" . $row['comment'] . "</td>"; echo "</tr>"; } } Quote Link to comment Share on other sites More sharing options...
Xyphon Posted December 14, 2007 Author Share Posted December 14, 2007 Same problem. Still displays layout at bottom. Its the layout of bottom.php that Im having trouble wiht, it puts bottom.php under everything else, insted of to the right. Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 14, 2007 Share Posted December 14, 2007 Same problem. Still displays layout at bottom. Its the layout of bottom.php that Im having trouble wiht, it puts bottom.php under everything else, insted of to the right. I am not understanding this since I can't see your layout. Can you link me to your site? Quote Link to comment Share on other sites More sharing options...
Xyphon Posted December 14, 2007 Author Share Posted December 14, 2007 ptcrpg.awardspace.com. Please do not register. Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 14, 2007 Share Posted December 14, 2007 ptcrpg.awardspace.com. Please do not register. Your talking about the Disclaimer? Where do you want it? Quote Link to comment Share on other sites More sharing options...
Xyphon Posted December 14, 2007 Author Share Posted December 14, 2007 ptcrpg.awardspace.com. Please do not register. Your talking about the Disclaimer? Where do you want it? Not just the disclaimer. Look above the disclaimer, there will be part of the layout there if you go to view comments. Quote Link to comment Share on other sites More sharing options...
Xyphon Posted December 14, 2007 Author Share Posted December 14, 2007 Like, click view comments, and check the layout now. Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 14, 2007 Share Posted December 14, 2007 Replace the View comments page with <html> <title> Pokemon Trainer's Challenge RPG </title> <head> <style type='text/css'> A:link { color: #AFAFAF; text-decoration: underline; } A:visited { color: #AFAFAF; text-decoration: underline; } A:hover { color: #D0D0D0; text-decoration: none; } body { background-color: #000000; background-image: url('Url here if you have a background image'); scrollbar-face-color: #000000; scrollbar-highlight-color: #000000; scrollbar-shadow-color: #000000; scrollbar-darkshadow-color: #545454; scrollbar-3d-lightcolor: #545454; scrollbar-arrow-color: #ffffff; scrollbar-track-color: #545454; } .tables { border: 1px solid #252525; background-color: #313131;} .menus { width: 130px; border: 0px solid #575757; background-color: #313131;} .content { border: 0px solid #707070; background-color: #4F4F4F;} .disclaimer { border: 1px solid #252525; background-color: #313131;} </style> </head> <body> <div align='center'> <!--BANNER--> <table width='750' height='180' align="center" cellpadding='0' cellspacing='0' class='tables'> <tr><td> <center> <font face='verdana' color='#FFFFFF' size='6'><a href='index.php'> <img border='0' src='http://i3.tinypic.com/7xaet08.jpg'> </font> </tr></td> </table> <!--END of BANNER--> <!--LEFT MENU--> <table width='750' height='250' align="center" cellpadding='4' cellspacing='0' class='tables'> <tr><td class='menus' valign='top'> <font color='#AFAFAF' face='verdana' size='1'> <CENTER> <b>Catergory</b><br> <a href='index.php'>Home</a><br> <a href='register.php'>Register</a><br> <a href='login.php'>Log in</a><br> </CENTER> </td> <!--END of LEFT MENU--> <!--CONTENT--> <td class='content' valign='top'> <font color='#AFAFAF' face='verdana' size='1'> <div align='justify'> <br> <?PHP include('Connect.php'); include('top.php'); $result = mysql_query("SELECT * FROM news_comments"); echo "<table border='1'> <tr> <th>Hi,<br /> It's Xyphon. I have just made the news page, I hope you like it! Please, leave comments here!</th> </tr></table>"; echo "<table border='1' width='500'>"; echo "<tr> <td> <a href='postcomment.php'>Post Comment</a></td>"; echo "<td> <a href='viewcomments.php'>View Comments</a></td></tr></table>"; if(mysql_num_rows($result)==0){ echo "There are no current comments. Layout issues may accure."; } else { while($row = mysql_fetch_array($result)){ echo "<table border='1' width='500' height='20'>"; echo "<br /><br />"; echo "<tr>"; echo "<td><center><b>Username: </b><br />" . $row['username'] . "</center></td>"; echo "<td><center><b>ID: </b><br />" . $row['user_id'] . "</center></td></tr></table>"; echo "<table border='1' width='500' height='20'><tr><td><b>Comment:</b>"; echo "<td>" . $row['comment'] . "</td>"; echo "</tr>"; } } echo "</table>"; include('bottom.php'); ?><br> </div> </td> <!-- END of CONTENT--> <!--RIGHT MENU--> <td class='menus' valign='top'> <font color='#AFAFAF' face='verdana' size='1'> <CENTER> <b>Catergory</b><br> <a href='index.php'>Home</a><br> <a href='register.php'>Register</a><br> <a href='login.php'>Login</a><br> </CENTER> </td> </table> <!--END of RIGHT MENU--> <!--DISLCLAIMER--> <table width='750' align="center" cellpadding='4' cellspacing='0' class='disclaimer'> <tr><td> <font color='#AFAFAF' face='verdana' size='1'> <center> <b>Disclaimer:</b><br> The Pokémon Trainer's Challenge RPG is © Xyphon, Cless, and other staff members. All Pokémon images are © Nintendo, and The Pokémon Company. We are in no way affiliated with Nintendo, or any of it's affiliates. All programming and content on this site is © to Xyphon. If you steal any of this content, we can fine you. <br><br> Layout template by <a href='http://www.nightmarevalley.com' target='_blank'>Valley of Nightmares</a>. </center> </table> <!--END of DISCLAIMER--> </body> </html> Quote Link to comment Share on other sites More sharing options...
Xyphon Posted December 14, 2007 Author Share Posted December 14, 2007 I cant. If I do it'll mess up, I've tried. Quote Link to comment Share on other sites More sharing options...
Xyphon Posted December 14, 2007 Author Share Posted December 14, 2007 Like, it'll ahve the same error. Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 14, 2007 Share Posted December 14, 2007 I used dreamweaver to re-arrange the layout, just use it. Quote Link to comment Share on other sites More sharing options...
Xyphon Posted December 15, 2007 Author Share Posted December 15, 2007 I dont have admin rights, so I doubt it'll work. W/E, tohugh. I'll try. Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 15, 2007 Share Posted December 15, 2007 I dont have admin rights, so I doubt it'll work. W/E, tohugh. I'll try. It will work, never say never. If you don't have admin rights, then how do you expect to upload anything we give you? Quote Link to comment Share on other sites More sharing options...
Xyphon Posted December 15, 2007 Author Share Posted December 15, 2007 I copy and paste it. My no admin rights will let me download, but not upload.. Stupid, iI cant actually put it on my com.. I had admin rights, but I downloaded something and it screwed up outlook.. Now I'm screwed.. Blech Quote Link to comment Share on other sites More sharing options...
Xyphon Posted December 15, 2007 Author Share Posted December 15, 2007 Yep I was right, no workie. Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 15, 2007 Share Posted December 15, 2007 Weird, works fine on my server. Post the bottom.php script. Quote Link to comment Share on other sites More sharing options...
Xyphon Posted December 15, 2007 Author Share Posted December 15, 2007 Thats pointless, bottom works on very other code.. But here <?PHP /* if logged out */ if (!isset($_COOKIE['UserID'])) { echo " <br> </div> </td> <!-- END of CONTENT--> <!--RIGHT MENU--> <td class='menus' valign='top'> <font color='#AFAFAF' face='verdana' size='1'> <CENTER> <b>Catergory</b><br> <a href='index.php'>Home</a><br> <a href='register.php'>Register</a><br> <a href='login.php'>Login</a><br> </CENTER> </td> </table> <!--END of RIGHT MENU--> <!--DISLCLAIMER--> <table class='disclaimer' cellpadding='4' cellspacing='0' width='750'> <tr><td> <font color='#AFAFAF' face='verdana' size='1'> <center> <b>Disclaimer:</b><br> The Pokémon Trainer's Challenge RPG is © Xyphon, Cless, and other staff members. All Pokémon images are © Nintendo, and The Pokémon Company. We are in no way affiliated with Nintendo, or any of it's affiliates. All programming and content on this site is © to Xyphon. If you steal any of this content, we can fine you. <br><br> Layout template by <a href='http://www.nightmarevalley.com' target='_blank'>Valley of Nightmares</a>. </center> </table> <!--END of DISCLAIMER--> </body> </html> "; } if (isset($_COOKIE['UserID'])) { echo " <html> <br> </div> </td> <!-- END of CONTENT--> <!--RIGHT MENU--> <td class='menus' valign='top'> <font color='#AFAFAF' face='verdana' size='1'> <CENTER> <b>Catergory</b><br> <a href=''>Link here</a><br> <a href=''>Link here</a><br> <a href=''>Link here</a><br> <a href=''>Link here</a><br><br> <b>Catergory</b><br> <a href=''>Link here</a><br> <a href=''>Link here</a><br> <a href=''>Link here</a><br> <a href=''>Link here</a><br><br> <b>Catergory</b><br> <a href=''>Link here</a><br> <a href=''>Link here</a><br> <a href=''>Link here</a><br> <a href=''>Link here</a><br><br> </CENTER> </td></tr> </table> <!--END of RIGHT MENU--> <!--DISLCLAIMER--> <table class='disclaimer' cellpadding='4' cellspacing='0' width='750'> <tr><td> <font color='#AFAFAF' face='verdana' size='1'> <center> <b>Disclaimer:</b><br> The Pokémon Trainer's Challenge RPG is © Xyphon, Cless, and other staff members. All Pokémon images are © Nintendo, and The Pokémon Company. We are in no way affiliated with Nintendo, or any of it's affiliates. All programming and content on this site is © to Xyphon. If you steal any of this content, we can fine you. <br><br> Layout template by <a href='http://www.nightmarevalley.com' target='_blank'>Valley of Nightmares</a>. </center> </table> <!--END of DISCLAIMER--> </html> "; } ?> Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 15, 2007 Share Posted December 15, 2007 Try loggin in and go to view comments, see if the layout makes a difference, and try it while logged out. On your script you have </table> and on bottom.php you have <?PHP /* if logged out */ if (!isset($_COOKIE['UserID'])) { echo " <br> </div> </td> Doesnt make sense Quote Link to comment Share on other sites More sharing options...
Xyphon Posted December 15, 2007 Author Share Posted December 15, 2007 Same thing. Its really sad when the greatest helper, and pro, phpSensei is having trouble fixing it.. XD.. That just shows how horible I really am. Quote Link to comment Share on other sites More sharing options...
Xyphon Posted December 15, 2007 Author Share Posted December 15, 2007 Try loggin in and go to view comments, see if the layout makes a difference, and try it while logged out. On your script you have </table> and on bottom.php you have <?PHP /* if logged out */ if (!isset($_COOKIE['UserID'])) { echo " <br> </div> </td> Doesnt make sense I ment to take that away.. And </table> Is for the table, duh.. Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 15, 2007 Share Posted December 15, 2007 Same thing. Its really sad when the greatest helper, and pro, phpSensei is having trouble fixing it.. XD.. That just shows how horible I really am. lol, I am pro with PHP, just not with html. I am going to examine the HTML and how its affecting the rest of the layout, and post the script in a sec, but This right here should work 100% <html> <title> Pokemon Trainer's Challenge RPG </title> <head> <style type='text/css'> A:link { color: #AFAFAF; text-decoration: underline; } A:visited { color: #AFAFAF; text-decoration: underline; } A:hover { color: #D0D0D0; text-decoration: none; } body { background-color: #000000; background-image: url('Url here if you have a background image'); scrollbar-face-color: #000000; scrollbar-highlight-color: #000000; scrollbar-shadow-color: #000000; scrollbar-darkshadow-color: #545454; scrollbar-3d-lightcolor: #545454; scrollbar-arrow-color: #ffffff; scrollbar-track-color: #545454; } .tables { border: 1px solid #252525; background-color: #313131;} .menus { width: 130px; border: 0px solid #575757; background-color: #313131;} .content { border: 0px solid #707070; background-color: #4F4F4F;} .disclaimer { border: 1px solid #252525; background-color: #313131;} </style> </head> <body> <div align='center'> <!--BANNER--> <table width='750' height='180' align="center" cellpadding='0' cellspacing='0' class='tables'> <tr><td> <center> <font face='verdana' color='#FFFFFF' size='6'><a href='index.php'> <img border='0' src='http://i3.tinypic.com/7xaet08.jpg'> </font> </tr></td> </table> <!--END of BANNER--> <!--LEFT MENU--> <table width='750' height='250' align="center" cellpadding='4' cellspacing='0' class='tables'> <tr><td class='menus' valign='top'> <font color='#AFAFAF' face='verdana' size='1'> <CENTER> <b>Catergory</b><br> <a href='index.php'>Home</a><br> <a href='register.php'>Register</a><br> <a href='login.php'>Log in</a><br> </CENTER> </td> <!--END of LEFT MENU--> <!--CONTENT--> <td class='content' valign='top'> <font color='#AFAFAF' face='verdana' size='1'> <div align='justify'> <br> <?PHP include('Connect.php'); include('top.php'); $result = mysql_query("SELECT * FROM news_comments"); echo "<table border='1'> <tr> <th>Hi,<br /> It's Xyphon. I have just made the news page, I hope you like it! Please, leave comments here!</th> </tr></table>"; echo "<table border='1' width='500'>"; echo "<tr> <td> <a href='postcomment.php'>Post Comment</a></td>"; echo "<td> <a href='viewcomments.php'>View Comments</a></td></tr></table>"; if(mysql_num_rows($result)==0){ echo "There are no current comments. Layout issues may accure."; } else { while($row = mysql_fetch_array($result)){ echo "<table border='1' width='500' height='20'>"; echo "<br /><br />"; echo "<tr>"; echo "<td><center><b>Username: </b><br />" . $row['username'] . "</center></td>"; echo "<td><center><b>ID: </b><br />" . $row['user_id'] . "</center></td></tr></table>"; echo "<table border='1' width='500' height='20'><tr><td><b>Comment:</b>"; echo "<td>" . $row['comment'] . "</td>"; echo "</tr>"; } } echo "</table>"; ?><br> </div> </td> <!-- END of CONTENT--> <!--RIGHT MENU--> <td class='menus' valign='top'> <font color='#AFAFAF' face='verdana' size='1'> <CENTER> <b>Catergory</b><br> <a href='index.php'>Home</a><br> <a href='register.php'>Register</a><br> <a href='login.php'>Login</a><br> </CENTER> </td> </table> <!--END of RIGHT MENU--> <!--DISLCLAIMER--> <table width='750' align="center" cellpadding='4' cellspacing='0' class='disclaimer'> <tr><td> <font color='#AFAFAF' face='verdana' size='1'> <center> <b>Disclaimer:</b><br> The Pokémon Trainer's Challenge RPG is © Xyphon, Cless, and other staff members. All Pokémon images are © Nintendo, and The Pokémon Company. We are in no way affiliated with Nintendo, or any of it's affiliates. All programming and content on this site is © to Xyphon. If you steal any of this content, we can fine you. <br><br> Layout template by <a href='http://www.nightmarevalley.com' target='_blank'>Valley of Nightmares</a>. </center> </table> <!--END of DISCLAIMER--> </body> </html> Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 15, 2007 Share Posted December 15, 2007 Try loggin in and go to view comments, see if the layout makes a difference, and try it while logged out. On your script you have </table> and on bottom.php you have <?PHP /* if logged out */ if (!isset($_COOKIE['UserID'])) { echo " <br> </div> </td> Doesnt make sense I ment to take that away.. And </table> Is for the table, duh.. No, its because you are ending a table, and your are putting a </td> without the any new <table> Quote Link to comment Share on other sites More sharing options...
Xyphon Posted December 15, 2007 Author Share Posted December 15, 2007 Try loggin in and go to view comments, see if the layout makes a difference, and try it while logged out. On your script you have </table> and on bottom.php you have <?PHP /* if logged out */ if (!isset($_COOKIE['UserID'])) { echo " <br> </div> </td> Doesnt make sense I ment to take that away.. And </table> Is for the table, duh.. Wait, how deosnt it? It's checking if they arent logged in, it'll dsiplay it differantly.. And the echo will continue the thing from top. And no, it doesnt. It still messes it up. Also, no, Im not. I ahve </table> After the </td> Then my next </td> is before the next </table> Look over the code. Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 15, 2007 Share Posted December 15, 2007 Try this on the BOTTOM.php if(isset($_COOKIE['UserID'])){ echo " <html> <br> </div> </td> <!-- END of CONTENT--> <!--RIGHT MENU--> <td class='menus' valign='top'> <font color='#AFAFAF' face='verdana' size='1'> <CENTER> <b>Catergory</b><br> <a href=''>Link here</a><br> <a href=''>Link here</a><br> <a href=''>Link here</a><br> <a href=''>Link here</a><br><br> <b>Catergory</b><br> <a href=''>Link here</a><br> <a href=''>Link here</a><br> <a href=''>Link here</a><br> <a href=''>Link here</a><br><br> <b>Catergory</b><br> <a href=''>Link here</a><br> <a href=''>Link here</a><br> <a href=''>Link here</a><br> <a href=''>Link here</a><br><br> </CENTER> </td></tr> </table> <!--END of RIGHT MENU--> <!--DISLCLAIMER--> <table class='disclaimer' cellpadding='4' cellspacing='0' width='750'> <tr><td> <font color='#AFAFAF' face='verdana' size='1'> <center> <b>Disclaimer:</b><br> The Pokémon Trainer's Challenge RPG is © Xyphon, Cless, and other staff members. All Pokémon images are © Nintendo, and The Pokémon Company. We are in no way affiliated with Nintendo, or any of it's affiliates. All programming and content on this site is © to Xyphon. If you steal any of this content, we can fine you. <br><br> Layout template by <a href='http://www.nightmarevalley.com' target='_blank'>Valley of Nightmares</a>. </center> </table> <!--END of DISCLAIMER--> </html> "; } else { echo '<br> </div> </td> <!-- END of CONTENT--> <!--RIGHT MENU--> <td class='menus' valign='top'> <font color='#AFAFAF' face='verdana' size='1'> <CENTER> <b>Catergory</b><br> <a href='index.php'>Home</a><br> <a href='register.php'>Register</a><br> <a href='login.php'>Login</a><br> </CENTER> </td> </table> <!--END of RIGHT MENU--> <!--DISLCLAIMER--> <table width='750' align="center" cellpadding='4' cellspacing='0' class='disclaimer'> <tr><td> <font color='#AFAFAF' face='verdana' size='1'> <center> <b>Disclaimer:</b><br> The Pokémon Trainer's Challenge RPG is © Xyphon, Cless, and other staff members. All Pokémon images are © Nintendo, and The Pokémon Company. We are in no way affiliated with Nintendo, or any of it's affiliates. All programming and content on this site is © to Xyphon. If you steal any of this content, we can fine you. <br><br> Layout template by <a href='http://www.nightmarevalley.com' target='_blank'>Valley of Nightmares</a>. </center> </table> <!--END of DISCLAIMER--> </body> </html> '; } 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.