Jump to content

Parse Error - Can't See It!


herghost

Recommended Posts

Hi all, can a fresh pair of eyes see my mistake? The error is reported on line 119 which is the last line and I can not spot it anywhere in the code :(

 

<?php
session_start();

include('../include/dbconnect.php');

$id=$_GET['id'];

$sql="SELECT * FROM forum_question WHERE id='$id'";
$result=mysql_query($sql) or die ("fucked" .mysql_error()) ;
while($rows=mysql_fetch_array($result))
{

?>
<p>
<h1> <?php echo $rows['title'];?>   </h1>
<table>
<tr>
<th>System Info: </th><td>Operating System: <?php echo $rows['os'] ;?>,<br />
Amount of Ram: <?php echo $rows['ram'] ;?>,<br />
Harddrive Type & Size: <?php echo $rows['harddrive'] ;?>, <br />
Graphics Card: <?php echo $rows['graphics'] ;?></td>
</tr>

<tr>
<th>Topic: </th><td> <?php echo $rows['title'] ;?> </td>
</tr>
<tr>
<th>Posted By: </th><td> <?php echo $rows['username'] ;?> </td>
</tr>
<tr>
<th>Posted On: </th><td> <?php echo $rows['datetime'] ;?> </td>
</tr>

<br />


<tr>
<th>Description: </th><td> <?php echo $rows['detail'];?> </td>
</tr>
<?php
}
?>
<tr>
<th>Download DxDIAG: </th>
<?php $query = "SELECT id, name FROM upload WHERE post_no = '$id'";
$result = mysql_query($query) or die('Error, query failed');
if(mysql_num_rows($result) == 0)
{
echo "No DxDIAG Exists <br>";
}
else
{
while(list($id, $name) = mysql_fetch_array($result))
{
?>
<td><a href="javascript:ajaxpage('forum/download.php?id= <?php echo $id; ?>', 'main');">Download</a><td><br>
<?php
}
}

?>

<tr></tr>
<tr></tr>
<tr>
<th><a href="javascript:ajaxpage('forum/solutions.php','main');">Back</a></th>
</tr>
</table>

<p>
<?php
  
// Switch to table "forum_answer"

$sql2="SELECT * FROM forum_answer WHERE question_id='$id'";
$result2=mysql_query($sql2);

while($rows=mysql_fetch_array($result2)){
?><br>
  
  <?php


$sql3="SELECT view FROM forum_question WHERE id='$id'";
$result3=mysql_query($sql3);

$rows=mysql_fetch_array($result3);
$view=$rows['view'];

// if have no counter value set counter = 1
if(empty($view)){
$view=1;
$sql4="INSERT INTO forum_question(view) VALUES('$view') WHERE id='$id'";
$result4=mysql_query($sql4);
}

// count more value
$addview=$view+1;
$sql5="update forum_question set view='$addview' WHERE id='$id'";
$result5=mysql_query($sql5);


?>

  
  
</p>


<form method="post" action="forum/add_answer.php?id=<?php echo $id ; ?>">			
		<p>		

			<label><?php echo $_SESSION['username']; ?>'s Reply</label>
			<textarea rows="5" cols="5" name="answer" id="answer"></textarea>
			<input name="id" type="hidden" value="<?php echo $id ;?>" />
			<input class="button" type="submit" />		
		</p>		
		</form>	

Link to comment
https://forums.phpfreaks.com/topic/175367-parse-error-cant-see-it/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.