O'Reilly Forums: Php Mysql Links Problem - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Php Mysql Links Problem

#1 User is offline   utanoel 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 14-February 14

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 { ?>
<tr>
<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>
</tr>
<?php } while ($row_viewFAQMasterFile = mysql_fetch_assoc($viewFAQMasterFile)); ?>
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users