By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,627 Members | 1,870 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,627 IT Pros & Developers. It's quick & easy.

How to display messages from mysql database in rows?

P: 5
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.
May 2 '10 #1
Share this Question
Share on Google+
1 Reply

Expert 5K+
P: 5,058

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.

Expand|Select|Wrap|Line Numbers
  1. echo "<a href=\"delete.php?id={$row['id']}\">Delete</a> ";
  2. echo "<a href=\"reply.php?id={$row['id']}\">Reply</a> ";
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.
May 2 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.