How to display messages from mysql database in each rows?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Locked
ashfaqbinnazar
Forum Newbie
Posts: 5
Joined: Thu Apr 29, 2010 1:02 am

How to display messages from mysql database in each rows?

Post by ashfaqbinnazar »

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.
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: How to display messages from mysql database in each rows

Post by Darhazer »

Show the non-working code...

Code: Select all

 // First you need to select the rows with a query:
$result = mysql_query(<YOUR_QUERY>);
// then iterate through the results
while ($row = mysql_fetch_row($result)) {
    echo $row['message'];
    // here you can output the button as well
}
 
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: How to display messages from mysql database in each rows

Post by Benjamin »

:arrow: Duplicate = Locked
Locked