dodaj.htm
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-2">
<h2>Dodawanie newsa:
</h2> <form action="dodaj.php" method=post> tytuł:
<input type="text" name="tytul">
dodaj.php
<?php
$query = mysql_query("insert into newsy values('', '$tytul', '$skrot', '$tresc', now() )"); echo 'Dzi_kujemy za dodanie newsa'; ?>
include.php
<?php
$query = mysql_query("select * from newsy order by data desc limit 0,3"); {
$tekst .= '<b><h3>'.$rekord[1].'</h3></b>'.$rekord[2].'<br/><a href="news.php?id='.$rekord[0].'">czytaj wiecej...</A>';
}
?>
news.php
<?php
$query = mysql_query("select * from newsy where id='$id'"); $tekst = '<b><h3>'.$rekord[1].'</h3></b>'.$rekord[3].'<br/><br/>'.$rekord[4];
?>
Pojawia sie błąd
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\xampp\htdocs\skrypty\x\news.php on line 5