I am not sure at 100%, but I think the reason why you only get your last record is this:
Somewhere you have a line:
$row_show = mysql_fetch_assoc($show);
After this, the result pointer is placed after the first record.
Later you have the code:
while ($data = mysql_fetch_array($show)) {
As the pointer is at the second line, the first one cannot be displayed anymore.
Solutions:
Either you omit the mysql_fetch_assoc() and use the mysql_fetch_array() to display the results
Or you use that first array to display the results and omit the mysql_fetch_array() .
Or you reset the pointer to the first position : mysql_data_seek($show, 0)
However, your table will display in this way:
ID: 1
Password: passwd1
Name: name1
(etc)
ID: 2
Password: passwd2
Name: name2
(etc)
ID: 3
Password: passwd3
Name: name3
(etc)
Maybe you want to have a multicolumn table to display the data:
ID Password Name ...
1 passwd1 name1 ...
2 passwd2 name2 ...
You have to change your code do do this:
code=php
else
{
echo("<table border='1' width='500'>");
echo("<tr><th>ID</th><th>Password></th><th>Name</th> etc</tr>");
while( $row = mysql_fetch_array($result) )
{
echo("
<tr>
<td width='389'>" . row[$rid] . "</td>
<td width='389'>" . row[$rpass] . "</td>
<td width='389'>" . row[$rname] . "</td>
(etc)
</tr>
...etc
");
}
echo("</table>");
}[/code]