<?php
/*SQL Configuration*/
$address = "IP"; //Database Address
$username = "db"; //Database Username
$password = "db"; //Database Password
$database = "dbname"; //Database Name
$connect = mysql_connect($address,$username,$password) or die("Cant connect to the database");
$select_db = mysql_select_db($connect,$database) or die("Failed to connect to the database");
/*SQL Query*/
$query = "SELECT * FROM `cp_news` ORDER BY modified DESC";
$sql = mysql_query($query) or die("Failed to make select query command");
?>
<html>
<head>
<title>Notice</title>
<style type="text/css">
body{
margin:0px;
font-family:Arial,Tahoma,Verdanna;
background-color: #000000;
}
th{
font-weight:bolder;
font-size:9pt;
padding:5px;
}
td{
padding:5px;
font-size:9pt;
}
</style>
</head>
<body>
<?php while($fetch = mysql_fetch_array($sql)){ ?>
<table cellpadding="0" cellspacing="0" style="margin-bottom:10px;">
<tr>
<th>
[<?php echo htmlspecialchars($fetch['created']); ?>] - <?php echo htmlspecialchars($fetch['title']); ?>
</th>
</tr>
<tr>
<td>
<?php echo $fetch['body']; ?>
</td>
</tr>
<tr>
<td align="right">
Posted by: <?php echo $fetch['author']; ?>
</td>
</tr>
</table>
<?php } ?>
</body>
</html>
Here's the code i edited but it's not working
*I remove my ip address and user pass for privacy.
up!
can anyone help me here please?
up
^
Help here please!