Chapter 7 (Fetch)
Chapter 7 (Fetch)
php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("vp11", $con);
while($row = mysql_fetch_array($result))
{
echo $row['name'] . " " . $row['dep'];
echo "<br />";
}
mysql_close($con);
?>