Forum Moderators: mack
Am trying to learn php again and hv encountered problem which i hv listed below. Anybody know why it show error?
Thanks
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<head>
<title>CGIG: Display your content</title>
</head>
<?php
// Display content in database
$dbcnx=@mysql_connect('localhost','root','');
if (!$dbcnx) {
exit('<p>Unable to connect to the database server at this time.</p>');
}
if (!@mysql_select_db('cgig')) {
exit('<p>Unable to locate content at this time.</p>');
}
$result=@mysql_query('SELECT filename,headline,about,keywords,content FROM content');
if (!$result) {
exit('<p>Unable to perform query.</p>');
//Display the content of site
while ($row=mysql_fetch_array($result)) {
echo '<p>'. $row['filename'].'</p>';
}
?>