Php Mysql Links Problem

  • Please log in to reply
No replies to this topic

#1 utanoel


    New Member

  • Members
  • Pip
  • 1 posts

Posted 14 February 2014 - 05:16 AM

I have a file

viewPagesMasterList.php which shows data from a php-mysql database. The list is as shown below when run in a browser:

id title image
1 mypagetitle_1 image_1.jpg
2 mypagetitle_2 image_2.jpg
3mypagetitle_3 image_5.jpg

The id column is made up of links, that is id 1, 2 and 3 above, are links.

When I click link 1 it takes me to viewPagesDetails.php?recordID=1 and displays the correct results.

When I click link 2 it shows viewPagesDetails.php?recordID=2 but displays incorrect results, that is, it still displays the same result shown when link 1 is clicked.

The same happens when with all other links.

How can I make the links point to the correct record and display it correctly?

Here is a snippet of the code that is producing the results above:

<?php do { ?>
<td><a href="viewFAQDetails.php?recordID=<?php echo $row_viewFAQMasterFile['id']; ?>"> <?php echo $row_viewFAQMasterFile['id']; ?>&nbsp; </a></td>
<td><?php echo $row_viewFAQMasterFile['question']; ?>&nbsp; </td>
<?php } while ($row_viewFAQMasterFile = mysql_fetch_assoc($viewFAQMasterFile)); ?>

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users