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