hello phpgurus,
A simple script and Pretty straight forward one, but driving me nuts.
well, here what i'm trying to do....
1.Displaying the records from a mysql table.
2.when the user clicks on the record, a new page has to be displayed.
Whats the error i'm getting???
When i click on the record, the folder contents are opened rather than the file.
Here how my table looks like
Id PARENTTOPIC_NAME PARENTTOPIC_CONTENT
1 comedy humour.php
2 fiction science.php
Now, I'm displaying the records comedy and fiction:
when the user clicks on comedy, humour.php has to be shown and the same with the other.
If somebody feels that I'm doing wrong, pls guide me.
I wonder if there is something to do with the field types, like my PARENTTOPIC_CONTENT is of text type.
Thanks everybody for your time
Here is the source code:
<?php
include "../dbconnection.dam";
$select_query = "SELECT PARENTTOPIC_NAME FROM topic ORDER BY TOPIC_ID DESC LIMIT 10";
$result = mysql_query($select_query);
$numrows = mysql_num_rows($result);
while($row = mysql_fetch_array($result)){
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>humor</title>
</head>
<body>
<table border="1" width="100%">
<tr>
<td width="100%">
<?
echo "<a href=".$row[PARENTTOPIC_CONTENT].">".$row[PARENTTOPIC_NAME]."</a>";
?>
</td>
</tr>
</table>
<?
}
?>
</body>
</html>