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!
<?php
$result = mysql_query("SELECT * FROM ingeschreven ORDER BY id DESC ") or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
$naam = $row['naam'] . " ";
}
while($naam=mysql_fetch_row($result))
{
$i=0;
while ($i < mysql_num_fields($result))
{
$field_name=mysql_fetch_field($result, $i);
echo $naam[$i] . " "; //Display all the fields on one line
$i++;
}
}
?>
I'm trying to get all the names from a table called "ingeschreven" and the name field is named "naam"...