Hi cahva, I tried to make your code simple and test it out to improve my PHP skill. But I got this error:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /var/www/html/diy4org/listmember.php on line 22
Can you tell me where is my mistake? Thanks!
<html>
<head><title></title></head>
<body>
<?php
include( "connect.php" );
$query = "SELECT name, recordID FROM member";
$result = mysql_query( $query );
?>
<form action="" method="post">
<?php
while( $row = mysql_fetch_array( $result ) )
{
echo '<input type="checkbox" name="'.$row['name']'" value="'.$row['recordID'].'">'.$row['name'].'<br>';
}
mysql_close();
?>
</form>
</body>
</html>