How to display messages from mysql database in rows?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ashfaqbinnazar
    New Member
    • Apr 2010
    • 5

    #1

    How to display messages from mysql database in rows?

    hi friends,
    How can i display messages from mysql databse in each rows with delete button and reply button.
    Please help me...
    no codes working properly,
    thanks in advance.
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hey.

    Typically, you just print a link to the script that does the action you need (delete, reply, etc...) including a GET parameter with the ID of the row, so the script knows which row to work on.

    Like:
    [code=php]echo "<a href=\"delete.p hp?id={$row['id']}\">Delete</a> ";
    echo "<a href=\"reply.ph p?id={$row['id']}\">Reply</a> ";[/code]
    There I assume the $row['id'] value is the ID of the row currently being displayed.

    Then you just use the $_GET array in those scripts to access the ID, so you can do what needs to be done to the correct row.

    Comment

    Working...