[Release] Compleat website news system

Joined
Jan 11, 2007
Messages
806
Reaction score
7
This is a re-release of Xn's Web news system.

I have took the time and made a editor so you can update the news from the website.
It can be added to any Admin panel with small edits.

This news system displays just like the one in Na rose online's Launcher.
This news system can be seen in Launcher and on website.
I will have a example on my site very soon.

I hope this helps people. I know i had some troubles finding a good news system
i could have updated on my AP, Also Stores in database so no cludder in folders.


Peace Icon
 
The news.php is called newspost.php lol
heres whats coded for the script to add news

Edit: I see whats wrong
find:
<form action="news.php" method="post">

replace with :
<form action="newspost.php" method="post">


Code:
<form action="newspost.php" method="post">
  <center>
    <table width="221" border="0" align="left">
      <tr>
        <td width="43" height="29">Title:</td>
        <td width="235"><label>
          <input name="title" type="text" id="title" size="28" />
        </label></td>
      </tr>
      <tr>
        <td height="34">Date:</td>
        <td><input name="date" type="text" id="date" size="28" /></td>
      </tr>
      <tr>
        <td height="38">News: </td>
        <td><textarea name="news" cols="25" rows="10" id="news"></textarea></td>
      </tr>
    </table>
  </center>
  <p align="center"> </p>
  <p align="left"><br />
  </p>
  <p align="left"> </p>
  <p align="left"> </p>
  <p align="left"> </p>
  <p align="left"> </p>
  <p align="left"><br />
    <br />
    <input name="submit" type="submit" value="Addnews" />
  </p>
</form>
<?php
$DBhost = "localhost";
$DBuser = "your user name";
$DBpass = "Your Password";
$DBName = "The Name of the Database";
mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable to connect to database");

@mysql_select_db("$DBName") or die("Unable to select
database $DBName");

if(isset($_POST['submit'])) {
if(!$_POST['title'] || !$_POST['date'] || !$_POST['news']) {
echo('You must fill in all of the feilds!!!\n<BR>');
exit();
}
if(!get_magic_quotes_gpc()) {
$title = addslashes($_POST['title']);
$date = addslashes($_POST['date']);
$news = addslashes($_POST['news']);
} else {
$title = $_POST['title'];
$date = $_POST['date'];
$news = $_POST['news'];
}
mysql_query("INSERT INTO news_roseon (title, date, news) VALUES ('$title', '$date', '$news')") or die(mysql_error());
print "<BR><font color=green><b>News Upated! </b>.</font>";
}
mysql_close();
?>

I know this works well i have added it into my admin pannel
 
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\wamp\www\news\settings.php on line 29

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\wamp\www\news\settings.php on line 39


What sould I do? Oo
 
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\wamp\www\news\settings.php on line 29

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\wamp\www\news\settings.php on line 39


What sould I do? Oo
Same Help!
....
 
Back