Jump to content

Error Help


Nightseer

Recommended Posts

Can someone please tell me why this isn't working? I'm really trying, but I'm very new to this, and
I have now been going over the same code for two days with no success:( This is the first thing
I've actually tried to write myself (not modify from open source) and I got it where the rest
is working-you caqn add the message to the database, but I cannotr get it to view how I want it......


[code]<?php
include('inc/membersonly.php');
include('h2.php');


// get value of id that sent from address bar
$id=$_GET['id'];

$sql="SELECT * FROM forum_question WHERE id='$id'";
$result=mysql_query($sql);

$rows=mysql_fetch_array($result);
$author = $row['fid'];
$message = $row['detail'];
$subject = $row['topic'];
$datetime = $row['datetime'];

echo "<table width="400" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"><tr>
<td><table width="100%" border="0" cellpadding="3" cellspacing="1" bordercolor="1" bgcolor="#FFFFFF"><tr>
<td bgcolor="#F8F7F1"><strong>$subject</strong></td></tr>
<tr><td bgcolor="#F8F7F1">$message</td></tr>
<tr><td bgcolor="#F8F7F1"><strong><b>Author:</b> <a href=account.php?vmid=$author>" . getUsername($author) . "</a></td></tr>
<tr><td bgcolor="#F8F7F1"><strong>Date/time : </strong>$datetime</td></tr></table></td></tr></table>

";
?>[/code]
Link to comment
https://forums.phpfreaks.com/topic/22778-error-help/
Share on other sites

Figured part of it out-now getting:
Parse error: syntax error, unexpected '>' in /home/virtualp/public_html/view_topic.php on line 21
and can't figure out how to remove it and keep link. code now is:

[code]<?php
include('inc/membersonly.php');
include('h2.php');


// get value of id that sent from address bar
$id=$_GET['id'];

$sql="SELECT * FROM forum_question WHERE id='$id'";
$result=mysql_query($sql);

$rows=mysql_fetch_array($result);
$author = $row['fid'];
$message = $row['detail'];
$subject = $row['topic'];
$datetime = $row['datetime'];

echo "<table width=\"400\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#CCCCCC\"><tr>
<td><table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" bordercolor=\"1\" bgcolor=\"#FFFFFF\"><tr>
<td bgcolor="#F8F7F1"><strong>$subject</strong></td></tr>
<tr><td bgcolor=\"#F8F7F1\">$message</td></tr>
<tr><td bgcolor=\"#F8F7F1\"><strong><b>Author:</b> <a href=account.php?vmid=$author>" . getUsername($author) . "</a></td></tr>
<tr><td bgcolor=\"#F8F7F1\"><strong>Date/time : </strong>$datetime</td></tr></table></td></tr></table>

";
?>[/code]
Link to comment
https://forums.phpfreaks.com/topic/22778-error-help/#findComment-102559
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.