I'm putting together a website where members can upload their fiction, and then view all the fiction on the site via a table with title/author columns. I've gotten the registration stuff to all work, and the uploading of the fiction part to work, but when it comes to viewing the stories I'm having trouble. I've been modifying some freeware scripts (am an extreme newbie to PHP) to do this but there was so much to modify with this script that I'm sure I messed something up somewhere.
The table does print but with $row[title] where the actual title should be, and with $row[username] where the author name should be.
My code for that section of the script is:
$query_result = mysql_query ($query);
while ($row = mysql_fetch_row ($query_result));
{
echo '<tr align=center>
<td align=left><i><a href="view_story.php?sid=$row[id]">$row[title]</a></i></td>
<td align="left">$row[username]</td>
</tr>';
}
I'm also confused as to how the ID part works - there's an id number that's automatically assigned to each entry in my table (the table seems to be set up correctly so I don't think I've got any problems there). I am selecting id as well as title and username in the $query line. Clicking on the link that appears in the table does pull up what it should, albeit only the latest test entry to be added.
Thanks for any ideas anyone has to offer.