newsy: http://ogar200.cba.pl/news.php
<?php require('config.php'); { $sql="SELECT DATE_FORMAT(dodano, '%e-%m-%Y %H:%i') AS utworzono, autor, tresc FROM newsy WHERE id='".intval($_GET['newsid'])."'"; { if($_POST) { { NOW(), '".trim(htmlspecialchars($_POST['autor']))."', '".trim(htmlspecialchars($_POST['tekst']))."')")) } } $sql="SELECT DATE_FORMAT(dodano, '%e-%m-%Y %H:%i') AS utworzono, autor, tresc FROM komentarze WHERE id='".intval($_GET['newsid'])."'"; { } ?> <hr> Dodaj komentarz:<br> <textarea name="tekst" rows="5" cols="40"></textarea><br> Autor:<br> <input type="text" name="autor"><br> <input type="reset" value="wyczyść"> <input type="submit" value="wyslij"> </form> <? } } else { $sql="SELECT newsy.id, DATE_FORMAT(newsy.dodano, '%e-%m-%Y %H:%i') AS utworzono, newsy.autor, newsy.tresc, COUNT(lp) AS il_kom FROM newsy LEFT JOIN komentarze ON (komentarze.id=newsy.id) GROUP BY newsy.id ORDER BY newsy.dodano DESC"; { } } ?>
to ma sie wyświetlać tu:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Romet Ogar 200 / Jawa 50 | Tuning</title> <meta name="Description" content="Strona dotycząca ogara 200 i jawy 50 informacje na temat tuningu JAWA 50, Ogar 200, Romet, Tuning,"> <meta name="Keywords" content="Tunign,romet,ogar 200,jawa 50,galeria,porady,schematy,tuning wizualny rometa"> <meta http-equiv="Content-Language" content="Poland" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" type="text/css" href="style.css" media="screen" /> <script type="text/javascript" src="js/prototype.js"></script> <script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script> <script type="text/javascript" src="js/lightbox.js"></script> <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" /> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-23363070-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </head> <body> <div id="wrap"> <div id="header"> <h1><a href="#">Ogar 200 Jawa 50</a></h1> <h2>Strona poświęcona Ogarowi 200</h2> </div> <?php include('includes/menu.php'); ?> <div id="content"> <div class="right"> <h2><a href="#">Witamy</a></h2> <center> <a href="galeria/mojogar.jpg" rel="lightbox" title="Mój Ogar 200"><img src="galeria/mojogar.jpg" HEIGHT="300" WIDTH="290" border="0"></a><br> Na naszej stronie poświęconej ogarowi 200 oraz Jawie 50 znajdziesz na niej informacje na temat<br> tuningu swojego motoroweru oraz naprawy.Jeżeli chciałbys się <br>skontaktować z autorem strony kliknij tutaj: <a href="kontakt.html" title="kontakt ogar 200">Kontakt z autorem</a><br> <br> <b>Statystyki:</b> <img src="http://www.licznikiodwiedzin.pl/licznik.php?user=xxdrago" alt="Darmowe liczniki" border="0"><br> Strona założona: 13.05.11r.<br> <br> Dodaj sie do naszej księgi: <A HREF="http://ksiegi.emix.net.pl/wpisz.php?user=Jawka50" target="_blank">dopisz do księgi</A><br> Wyświetl wpisy z naszej księgi: <A HREF="http://ksiegi.emix.net.pl/wyswietl.php?user=Jawka50" target="_blank">zobacz księgę</A><br> <?php include('news.php'); ?> // ten kod odpowiada za wyswietlanie </center> <br /><br /> </div> <div class="left"> <?php include('includes/menu2.php'); ?> <?php include('includes/linki.php'); ?> </div> <div style="clear: both;"> </div> </div> <div id="bottom"> </div> <?php include('includes/stopka.php'); ?> </div> </body> </html>
Dlaczego sie nie wyświetla?