Jump to content

brackets...


marklarah

Recommended Posts

<?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  :'(

 

 

Link to comment
Share on other sites

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"

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.