0

Hello what im looking for here is to get the next addition in the database to drop below the first set of tables. at the moment it is only showing the last persons submission it does create the tables with the data but with only the last persons.
when the next person submits data it will show it in the tables but wont show the prior submissions. I hope I explained this ok...lol
Example:
user 1 data input
user 2 data input
user 3 data input
into the tables below.

<?php

mysql_connect("localhost", "Name", "Pass") or die(mysql_error());
mysql_select_db("DB") or die(mysql_error());

$result = mysql_query("SELECT * FROM my_form_1");
$row = mysql_fetch_array ($result);

echo "<table border='1'>
<tr>
<th>CITY</th>
<th>STREET</th>
<th>RESPONDER</th>
<th>DISCRIPTION</th>
<th>TYPE OF CALL</th>
<th>DATE</th>
<th>TIME</th>
</tr>";

  {
  echo "<tr>";
  echo "<td>" . $row['element_1'] . "</td>";
  echo "<td>" . $row['element_2'] . "</td>";
  echo "<td>" . $row['element_3'] . "</td>";
  echo "<td>" . $row['element_4'] . "</td>";
  echo "<td>" . $row['element_5'] . "</td>";
  echo "<td>" . $row['element_6'] . "</td>";
  echo "<td>" . $row['element_7'] . "</td>";
  echo "</tr>";
  }
echo "</table>";
?>
Attachments Screenshot-2.png 34.95 KB Screenshot-3.png 10.97 KB
2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by wxflint
0

you should use while loop to show data at line 19.

while($row = mysql_fetch_array ($result))
0

Thanks daniel, That did the trick I do appreciate it... :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.