Novahq.net Forum

Novahq.net Forum (https://novahq.net/forum/index.php)
-   phphq.Net Forums (https://novahq.net/forum/forumdisplay.php?f=277)
-   -   PHP NEWS SCRIPT? (https://novahq.net/forum/showthread.php?t=38740)

o2 09-25-2004 03:27 AM

PHP NEWS SCRIPT?
 
Hi i am looking for a good PHP news script, any one know of 1?

Thanks...
o2

careless 09-25-2004 02:02 PM

well
 
i made one :p but i dont want ppl to use it cos they mess with copyright stuff which isnt even viewable lol

Dane 09-25-2004 04:45 PM

<?
include("settings.php");
$sql = "SELECT * FROM clanname_news ORDER BY news_id DESC";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)) {

echo "<br><br>";
echo "<table cellspacing=1 cellpadding=4 border=0 width=90%><tr><td id=outline2><b>".$row['news_title']."</b> - ";
echo $row['news_author']." - ".$row['news_date'];
echo "</td></tr><tr><td id=outline2>";

$body = $row['news_body'];
print(nl2br($body));

echo "</td>
</tr>
</table>";

echo "<br>";
}


?>

Dane 09-25-2004 04:45 PM

CREATE TABLE `clanname_news` (
`news_id` int(11) NOT NULL auto_increment,
`news_author` varchar(32) default NULL,
`news_title` varchar(32) default NULL,
`news_body` text,
`news_date` varchar(32) default NULL,
PRIMARY KEY (`news_id`)
) TYPE=MyISAM AUTO_INCREMENT=49 ;

Dane 09-25-2004 04:46 PM

settings.php

<?
$db = mysql_connect("localhost", "username", "password");
mysql_select_db("databasename", $db);
?>

Dane 09-25-2004 04:47 PM

This is a basic news script, use it if you want.

careless 09-26-2004 07:52 AM

wel..
 
not a bad script :)

i made one along same lines but with admin panel etc as it was part of my portal

Dane 09-26-2004 04:33 PM

just a few minutes work really hehe, but it does the job :), forgot to add the admin part lol. :D

XinG 10-30-2004 02:57 PM

careless can u send me that script? i wanna know how u make an admin panel n stuff, add me on msn if u can tomwatts20@hotmail.com


All times are GMT -5. The time now is 08:09 PM.

Powered by vBulletin®