imam neku news scriptu. ipload sm je na neti kada idem na neke stranice stalno mi pokazuje ovu gresku :
a kod je :
display.php
<?php
include('db.php');
$q = mysql_query("SELECT * FROM $table ORDER BY id DESC LIMIT $limit"); // That queriesthe database
while($r=mysql_fetch_array($q)){
$title = $r["title"];
$news = $r["news"];
$body = nl2br($news);
$author = $r["author"];
$link = "mailto:".$r["email"];
$date = $r["date"];
echo "<table width=\100%\ cellspacing=\2><tr>
<td><b>$title</b> posted by <a href='$link'>$author</a> on $date</td></tr>
<tr><td>$body</td></tr>
</table>";
}
?>
db.php
<?php
$user = "user";
$pass = "pass";
$dbase = "db_user";
$table = "news";
$host = "localhost";
$limit = "5";
$cnx = mysql_connect($host, $user, $pass);
mysql_select_db($dbase);
?>
i
CREATE TABLE `news` (
`id` INT( 40 ) NOT NULL AUTO_INCREMENT ,
`title` VARCHAR( 200 ) NOT NULL ,
`date` DATE NOT NULL ,
`news` TEXT NOT NULL ,
`author` VARCHAR( 40 ) NOT NULL ,
`email` VARCHAR( 100 ) NOT NULL ,
PRIMARY KEY ( `id` )
);
uvijek mi se prikazuje ista greska KOD SVIH SCRIPTI !!!
molim vas pomozite mi !
thx