Email Addresses of Friends


'; } mysql_select_db('1735215_pytest') or die("Cannot find database"); $query = "SELECT * FROM Friends"; $result = mysql_query($query); if(!$result) { die("Query failed"); } $rows = mysql_num_rows($result); echo '=== ' . $rows . ' records ===
'; for($c = 0; $c < $rows; ++$c) { echo 'Name : ' . mysql_result($result,$c,'Name') . '
' . PHP_EOL; echo 'email : ' . mysql_result($result,$c,'email') . '
' . PHP_EOL; echo '=======
' . PHP_EOL; } ?>
This demonstrates the use of PHP
to extract from MySQL and
present it inside a web-page.

(c) Dave Mulkey , Germany , 2014