marklarah Posted January 19, 2008 Share Posted January 19, 2008 <?php include_once 'top.php'; ?> <html> <title>TLS-3 Foums</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'; ?> <font face="Arial, Helvetica"><h1>Add Message <hr width="300" color="white" align="left"></h1><h2> <?php if (isset($_GET['board'])) { $boardA = $_GET['board']; $lool = 'SELECT * FROM boards WHERE `ID` = '.$boardA; $lol = mysql_query($lool) or die(mysql_error()); $row = mysql_fetch_array($lol); $tit = $row['title']; echo '<table><tr><tr>'; if (!isset($tit)){ echo 'You have to supply a valid board & topic ID to access this page. Return to the <a href="index.php">General Board List</a> to select a board.'; exit; }else{ echo $tit; } } echo '</td><td>'; ?> </h2> </td></tr></table> </font><font face="Century Gothic, Arial"> <? if (!isset($_GET['board'])) { ?> You have to supply a valid board ID to access this page. Return to the <a href="index.php">General Board List</a> to select a board. <?php exit; } if(!isset($usernamem)) { ?> You have to login/register this page. Return to the <a href="forum.php">General Board List</a> to select a board. <?php exit; } ?> <?php if (isset($_POST['tit']) || (isset($_POST['conte'])) { $mtit = $_POST['tit']; $mconte = $_POST['conte']; $randy = rand(1, 999999999); mysql_query("INSERT INTO topics (ID, Name, CBy, Last_post, Board, Key) VALUES(NULL, '$mtit', '$usernamem', NOW(), '$boardA', '$randy') ") or die(mysql_error()); $boby = mysql_query("SELECT * FROM topics WHERE Key = '$randy'") or die(mysql_error()); $lolb = mysql_fetch_array('$boby'); $hai = $lolb['ID']; mysql_query("INSERT INTO messages (messageid, topic, username, time, message, board) VALUES(NULL, '$hai', '$usernamem', NOW(), '$mcont', '$boardA') WHERE ") or die(mysql_error()); echo 'Topic Posted! Going back to the forums in 5 seconds or click <a href="forum.php'">here.</a>'; echo '<meta http-equiv="REFRESH" content="5;url=forum.php">'; }else{ ?> <?php $board = $_GET['board']; ?> <form method="post" action="newtopic.php?board=<?php echo $board; ?>"> Title:<br> <input type="text" name="tit"><br> <br> Message:</br> <textarea cols="40" rows="20" name="conte"> </textarea> <br> <input type="submit" value="Post"> </form> <?php } ?> </table> <?php include 'footer.php'; ?> Parse error: syntax error, unexpected '{' in /home2/tlscom/public_html/newtopic.php on line 92 ??? ??? ??? All my brackets line up i think. And yes, I will start indenting, i've learned a lesson here :'( Quote Link to comment https://forums.phpfreaks.com/topic/86844-brackets/ Share on other sites More sharing options...
trq Posted January 19, 2008 Share Posted January 19, 2008 And yes, I will start indenting, i've learned a lesson here Can you start now then? Quote Link to comment https://forums.phpfreaks.com/topic/86844-brackets/#findComment-443837 Share on other sites More sharing options...
Nhoj Posted January 19, 2008 Share Posted January 19, 2008 echo 'Topic Posted! Going back to the forums in 5 seconds or click <a href="forum.php'">here.</a>'; You have a single quote just after forum.php... Take it out and all should be well. "forum.php'" should be "forum.php" Quote Link to comment https://forums.phpfreaks.com/topic/86844-brackets/#findComment-443838 Share on other sites More sharing options...
marklarah Posted January 19, 2008 Author Share Posted January 19, 2008 lol I have on my own and I still can't find it Quote Link to comment https://forums.phpfreaks.com/topic/86844-brackets/#findComment-443840 Share on other sites More sharing options...
marklarah Posted January 19, 2008 Author Share Posted January 19, 2008 hmm I see that error, fixed that, but im still geting the bracket error. Quote Link to comment https://forums.phpfreaks.com/topic/86844-brackets/#findComment-443843 Share on other sites More sharing options...
trq Posted January 19, 2008 Share Posted January 19, 2008 Mind pointing out which is line 92 then? Quote Link to comment https://forums.phpfreaks.com/topic/86844-brackets/#findComment-443846 Share on other sites More sharing options...
Daniel0 Posted January 19, 2008 Share Posted January 19, 2008 Change if (isset($_POST['tit']) || (isset($_POST['conte'])) to if (isset($_POST['tit']) || isset($_POST['conte'])) Quote Link to comment https://forums.phpfreaks.com/topic/86844-brackets/#findComment-443848 Share on other sites More sharing options...
marklarah Posted January 19, 2008 Author Share Posted January 19, 2008 according to my editor, its white space. Quote Link to comment https://forums.phpfreaks.com/topic/86844-brackets/#findComment-443852 Share on other sites More sharing options...
marklarah Posted January 19, 2008 Author Share Posted January 19, 2008 ...thats why your recommended Daniel0 ! :) But im getting a brand new error now! Joy! Parse error: syntax error, unexpected $end in /home2/tlscom/public_html/newtopic.php on line 143 Quote Link to comment https://forums.phpfreaks.com/topic/86844-brackets/#findComment-443856 Share on other sites More sharing options...
marklarah Posted January 19, 2008 Author Share Posted January 19, 2008 line 143 is </form> Quote Link to comment https://forums.phpfreaks.com/topic/86844-brackets/#findComment-443860 Share on other sites More sharing options...
trq Posted January 19, 2008 Share Posted January 19, 2008 Syntax errors are generally something you need to learn to fix yourself. Especially when your code is so poorly indented. Posting everytime you get a syntax error is just poor form. Quote Link to comment https://forums.phpfreaks.com/topic/86844-brackets/#findComment-443861 Share on other sites More sharing options...
Daniel0 Posted January 19, 2008 Share Posted January 19, 2008 Although I agree with thorpe, that specific error (unexpected $end) is not particularly descriptive. See: http://www.phpfreaks.com/forums/index.php/topic,100473.0.html Quote Link to comment https://forums.phpfreaks.com/topic/86844-brackets/#findComment-443862 Share on other sites More sharing options...
marklarah Posted January 19, 2008 Author Share Posted January 19, 2008 *sorry* Ok sorry guys, ill close this topic then Quote Link to comment https://forums.phpfreaks.com/topic/86844-brackets/#findComment-443864 Share on other sites More sharing options...
revraz Posted January 19, 2008 Share Posted January 19, 2008 Just hunt for a missing } Quote Link to comment https://forums.phpfreaks.com/topic/86844-brackets/#findComment-443874 Share on other sites More sharing options...
marklarah Posted January 19, 2008 Author Share Posted January 19, 2008 okay guys, i've checked EVERYWHERE and i can't find that missing bracket. could it be anything else? Quote Link to comment https://forums.phpfreaks.com/topic/86844-brackets/#findComment-443889 Share on other sites More sharing options...
Fyorl Posted January 20, 2008 Share Posted January 20, 2008 This would be easier if you had something like <a href="http://kate-editor.org/">Kate</a> or <a href="http://notepad-plus.sourceforge.net/">Notepad++</a> Quote Link to comment https://forums.phpfreaks.com/topic/86844-brackets/#findComment-443914 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.