marklarah Posted January 9, 2008 Share Posted January 9, 2008 Hewp me pwease this page won't even load: <html> <title>TLS-3 Admin :: Insert Home-Blog Entry</title> <body bgcolor="#000000"> <p>Hi</p> <table width="900" align="center" border="0"> <tr> <td width="100%" height="133"> <img src="top.gif" width="900" height="133"></td> </tr> <tr> <td width="100%" height="30" bgcolor="#333333"> <font color="#FFFFFF" face="Bell MT, Bahtang, Helvetica"><? include 'bar.php'; ?></font> </td> </tr> <tr> <td width="100%" bgcolor="555565"> <?php include 'dbs.php'; ?> <?php if (isset($_SESSION['user'])) { if (($_SESSION['lvl']) >= "80") { ?> <table border="0"> <tr> <td> <font face="Arial, Helvetica"><h1>Blog Entry <hr width="300" color="white" align="left"></h1></font><br> <table> <tr> <td width="17">   </td> <td> <table border="0" cellpadding="0" cellspacing="0" width="504" align="left"> <tr> <td><img src="images/spacer.gif" width="45" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="226" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="233" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="1" height="1" border="0" alt=""></td> </tr> <tr> <td colspan="3"><img name="art_r1_c1" src="images/art_r1_c1.png" width="504" height="11" border="0" alt=""></td> <td><img src="images/spacer.gif" width="1" height="11" border="0" alt=""></td> </tr> <tr> <td><img name="art_r2_c1" src="images/art_r2_c1.png" width="45" height="26" border="0" alt=""></td> <td valign="top" bgcolor="#999999"><p style="margin:0px"> <b> <font size="+1" face="Century Gothic, Arial, Comic Sans MS, Helvetica">Insert Blog Entry</font></b></p></td> <td><img name="art_r2_c3" src="images/art_r2_c3.png" width="233" height="26" border="0" alt=""></td> <td><img src="images/spacer.gif" width="1" height="26" border="0" alt=""></td> </tr> <tr> <td><img name="art_r3_c1" src="images/art_r3_c1.png" width="45" height="17" border="0" alt=""></td> <td colspan="2"><img name="art_r3_c2" src="images/art_r3_c2.png" width="459" height="17" border="0" alt=""></td> <td><img src="images/spacer.gif" width="1" height="17" border="0" alt=""></td> </tr> <tr> <td colspan="3" background="images/art_r4_c1.png"> <table width="464" border="0" align="center"> <tr> <td> <font face="Verdana, Helvetica, Trebuchet MS, Comic Sans MS, Arial"> Insert new entry:<br> <form method="post" action="admin_homeblog_insert.php"> Title: <input type="text" name="title"><br> Article: <br> <textarea cols="40" rows="20" name="article"> Don't make posts too long, or the title too long, or it will screw the home page up. </textarea> <br> <input type="submit" value="Post"><input type="reset" value="Clear"> </form> <?php if (isset($_POST['article']) && isset($_POST['title'])) { $bsql = "INSERT INTO homeblog (ID, title, article, posted_by, date_posted) VALUES (NULL, '$btitle', '$barticle', '$_SESSION['user']', NOW())"; mysql_query($bsql) or die('Post Failed'); echo '<br><hr>Posted!'; } ?> </font> </td> </tr> </table> </td> <td><img src="images/spacer.gif" width="1" height="39" border="0" alt=""></td> </tr> <tr> <td colspan="3"><img name="art_r5_c1" src="images/art_r5_c1.png" width="504" height="41" border="0" alt=""></td> <td><img src="images/spacer.gif" width="1" height="41" border="0" alt=""></td> </tr> </table><?php }else{ echo 'Now you know you're not a high enough level to access this, so don't even try it >_>.'; } }else{ echo 'Now you know you're not a high enough level to access this, so don't even try it >_>.'; } ?></td></tr></table> </td> <td width="20">   </td> <td width="310" align="right" valign="top"> <? include 'side.php'; ?> </td> </tr> </table> </td> </tr> </table> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/85266-i-think-its-bad-syntax-or-something-but-my-page-wont-show-up/ Share on other sites More sharing options...
revraz Posted January 9, 2008 Share Posted January 9, 2008 I see at least two IF statements that are not closed. Quote Link to comment https://forums.phpfreaks.com/topic/85266-i-think-its-bad-syntax-or-something-but-my-page-wont-show-up/#findComment-435015 Share on other sites More sharing options...
marklarah Posted January 9, 2008 Author Share Posted January 9, 2008 they are closed if you scroll down my code >_> Quote Link to comment https://forums.phpfreaks.com/topic/85266-i-think-its-bad-syntax-or-something-but-my-page-wont-show-up/#findComment-435016 Share on other sites More sharing options...
drummer101 Posted January 9, 2008 Share Posted January 9, 2008 If the page is entirely blank, put the below code at the top of the page. <?php ini_set(error_reporting(E_ALL)); ?> and post the error Quote Link to comment https://forums.phpfreaks.com/topic/85266-i-think-its-bad-syntax-or-something-but-my-page-wont-show-up/#findComment-435018 Share on other sites More sharing options...
Ken2k7 Posted January 9, 2008 Share Posted January 9, 2008 If the page is entirely blank, put the below code at the top of the page. <?php ini_set(error_reporting(E_ALL)); ?> and post the error It's just: error_reporting(E_ALL); or ini_set("error_reporting", E_ALL); Quote Link to comment https://forums.phpfreaks.com/topic/85266-i-think-its-bad-syntax-or-something-but-my-page-wont-show-up/#findComment-435021 Share on other sites More sharing options...
drummer101 Posted January 9, 2008 Share Posted January 9, 2008 <?php if (isset($_SESSION['user'])) { if (($_SESSION['lvl']) >= "80") { ?> unclosed IFs <?php }else{ echo 'Now you know you're not a high enough level to access this, so don't even try it >_>.'; } }else{ echo 'Now you know you're not a high enough level to access this, so don't even try it >_>.'; } ?> unescaped single quotes Quote Link to comment https://forums.phpfreaks.com/topic/85266-i-think-its-bad-syntax-or-something-but-my-page-wont-show-up/#findComment-435022 Share on other sites More sharing options...
marklarah Posted January 9, 2008 Author Share Posted January 9, 2008 okay, ill just wait till it loads and ill post it. Quote Link to comment https://forums.phpfreaks.com/topic/85266-i-think-its-bad-syntax-or-something-but-my-page-wont-show-up/#findComment-435023 Share on other sites More sharing options...
marklarah Posted January 9, 2008 Author Share Posted January 9, 2008 i changed it to }else{ echo "Now you know you are not a high enough level to access this, so don't even try it."; } }else{ echo "Now you know you are not a high enough level to access this, so don't even try it."; } and it still won't work Quote Link to comment https://forums.phpfreaks.com/topic/85266-i-think-its-bad-syntax-or-something-but-my-page-wont-show-up/#findComment-435024 Share on other sites More sharing options...
marklarah Posted January 9, 2008 Author Share Posted January 9, 2008 and those elses close those ifs - and by the way the error just isn't showing up. you can see: http://tls-3.977mb.com/admin_homeblog_insert.php Quote Link to comment https://forums.phpfreaks.com/topic/85266-i-think-its-bad-syntax-or-something-but-my-page-wont-show-up/#findComment-435025 Share on other sites More sharing options...
Ken2k7 Posted January 9, 2008 Share Posted January 9, 2008 <?php if (isset($_SESSION['user'])) { if (($_SESSION['lvl']) >= "80") { ?> unclosed IFs I think they're closed. marklarah, please try this: <html> <title>TLS-3 Admin :: Insert Home-Blog Entry</title> <body bgcolor="#000000"> <p>Hi</p> <table width="900" align="center" border="0"> <tr> <td width="100%" height="133"> <img src="top.gif" width="900" height="133"></td> </tr> <tr> <td width="100%" height="30" bgcolor="#333333"> <font color="#FFFFFF" face="Bell MT, Bahtang, Helvetica"><? include 'bar.php'; ?></font> </td> </tr> <tr> <td width="100%" bgcolor="555565"> <?php include 'dbs.php'; ?> <?php if (isset($_SESSION['user'])) { if (($_SESSION['lvl']) >= 80) { ?> <table border="0"> <tr> <td> <font face="Arial, Helvetica"><h1>Blog Entry <hr width="300" color="white" align="left"></h1></font><br> <table> <tr> <td width="17">   </td> <td> <table border="0" cellpadding="0" cellspacing="0" width="504" align="left"> <tr> <td><img src="images/spacer.gif" width="45" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="226" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="233" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="1" height="1" border="0" alt=""></td> </tr> <tr> <td colspan="3"><img name="art_r1_c1" src="images/art_r1_c1.png" width="504" height="11" border="0" alt=""></td> <td><img src="images/spacer.gif" width="1" height="11" border="0" alt=""></td> </tr> <tr> <td><img name="art_r2_c1" src="images/art_r2_c1.png" width="45" height="26" border="0" alt=""></td> <td valign="top" bgcolor="#999999"><p style="margin:0px"> <b> <font size="+1" face="Century Gothic, Arial, Comic Sans MS, Helvetica">Insert Blog Entry</font></b></p></td> <td><img name="art_r2_c3" src="images/art_r2_c3.png" width="233" height="26" border="0" alt=""></td> <td><img src="images/spacer.gif" width="1" height="26" border="0" alt=""></td> </tr> <tr> <td><img name="art_r3_c1" src="images/art_r3_c1.png" width="45" height="17" border="0" alt=""></td> <td colspan="2"><img name="art_r3_c2" src="images/art_r3_c2.png" width="459" height="17" border="0" alt=""></td> <td><img src="images/spacer.gif" width="1" height="17" border="0" alt=""></td> </tr> <tr> <td colspan="3" background="images/art_r4_c1.png"> <table width="464" border="0" align="center"> <tr> <td> <font face="Verdana, Helvetica, Trebuchet MS, Comic Sans MS, Arial"> Insert new entry:<br> <form method="post" action="admin_homeblog_insert.php"> Title: <input type="text" name="title"><br> Article: <br> <textarea cols="40" rows="20" name="article"> Don't make posts too long, or the title too long, or it will screw the home page up. </textarea> <br> <input type="submit" value="Post"><input type="reset" value="Clear"> </form> <?php if (isset($_POST['article']) && isset($_POST['title'])) { $bsql = "INSERT INTO homeblog (ID, title, article, posted_by, date_posted) VALUES (NULL, '$btitle', '$barticle', '{$_SESSION['user']}', NOW())"; mysql_query($bsql) or die('Post Failed'); echo '<br><hr>Posted!'; } ?> </font> </td> </tr> </table> </td> <td><img src="images/spacer.gif" width="1" height="39" border="0" alt=""></td> </tr> <tr> <td colspan="3"><img name="art_r5_c1" src="images/art_r5_c1.png" width="504" height="41" border="0" alt=""></td> <td><img src="images/spacer.gif" width="1" height="41" border="0" alt=""></td> </tr> </table><?php }else{ echo 'Now you know you\'re not a high enough level to access this, so don\'t even try it >_>.'; } }else{ echo 'Now you know you\'re not a high enough level to access this, so don\'t even try it >_>.'; } ?></td></tr></table> </td> <td width="20">   </td> <td width="310" align="right" valign="top"> <? include 'side.php'; ?> </td> </tr> </table> </td> </tr> </table> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/85266-i-think-its-bad-syntax-or-something-but-my-page-wont-show-up/#findComment-435030 Share on other sites More sharing options...
marklarah Posted January 9, 2008 Author Share Posted January 9, 2008 hmm...still don't work... Quote Link to comment https://forums.phpfreaks.com/topic/85266-i-think-its-bad-syntax-or-something-but-my-page-wont-show-up/#findComment-435033 Share on other sites More sharing options...
revraz Posted January 9, 2008 Share Posted January 9, 2008 You're right, poor code indention made it hard to see those brackets. I would change all your <? to <?php Quote Link to comment https://forums.phpfreaks.com/topic/85266-i-think-its-bad-syntax-or-something-but-my-page-wont-show-up/#findComment-435035 Share on other sites More sharing options...
marklarah Posted January 9, 2008 Author Share Posted January 9, 2008 nah, still don't work. Anyway, quick tags are enabled I think Quote Link to comment https://forums.phpfreaks.com/topic/85266-i-think-its-bad-syntax-or-something-but-my-page-wont-show-up/#findComment-435036 Share on other sites More sharing options...
marklarah Posted January 9, 2008 Author Share Posted January 9, 2008 could it be the user checking? Quote Link to comment https://forums.phpfreaks.com/topic/85266-i-think-its-bad-syntax-or-something-but-my-page-wont-show-up/#findComment-435040 Share on other sites More sharing options...
marklarah Posted January 9, 2008 Author Share Posted January 9, 2008 ....maybe? Quote Link to comment https://forums.phpfreaks.com/topic/85266-i-think-its-bad-syntax-or-something-but-my-page-wont-show-up/#findComment-435043 Share on other sites More sharing options...
Ken2k7 Posted January 10, 2008 Share Posted January 10, 2008 Where did you make all the session variables? So far, the main page content loads only if the session exist, which it doesn't right now or at least not in that code. Quote Link to comment https://forums.phpfreaks.com/topic/85266-i-think-its-bad-syntax-or-something-but-my-page-wont-show-up/#findComment-435186 Share on other sites More sharing options...
marklarah Posted January 10, 2008 Author Share Posted January 10, 2008 you can login using a test account, username is "olive" so is password Quote Link to comment https://forums.phpfreaks.com/topic/85266-i-think-its-bad-syntax-or-something-but-my-page-wont-show-up/#findComment-435655 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.