Data being displayed multiple times. Can't figure out the problem for the life of me

When i submit info into my form, it gets displayed multiple times on the page.

while($row = mysql_fetch_array($data)) {

 Print "<tr>";
 Print "<th>Hit:</th> <td>".$row['hit'] . "</td> ";
 Print "<th>Amount:</th> <td>".$row['amount'] . " </td></tr>";
 Print "<th>Category:</th> <td>".$row['category'] . "</td> ";
 }
 Print "</table>";

I am very new with all of this and just can’t figure out the problem. it didnt start until i added that part in the code. When i refresh, more data gets posted also. I’m just not sure what i’m doing wrong.

The only thing I see wrong is that the closing </tr> tag is in the wrong place.

Show us your query…

Do you get a prompt about resending data (when you refresh)? If yes that’ll be why more data gets posted - your code is processing the form again and inserting the data again, seeing it as a new submission. :slight_smile:

(which may imply you have an issue with uniqueness in your database)