O to wybrane przezmnie fragmenty kodu.
fragment show_coment.php
<?php include(\"db.php\"); $sqlcmt = \"select * from comments where art_id='$id' AND type_id='$type_id' ORDER BY comment_id\"; print(\"<center><P style=\"font-size: 10px; font-family: tahoma; \"><b>Written $cnt comment(s) to this article</b><P></center>\"); if($cnt>0){ $user = $row[\"user_id\"]; $mail = $row[\"mail\"]; $info3= $row[\"COMMENT\"]; $ip = $row[\"ip\"]; $ipa[3] = 'xxx'; $date = $row[\"date\"]; $time = $row[\"time\"]; $sql22 = \"select * from users where user_name= '$user'\"; $avatar = $rowe[\"avatar\"]; $czas = $rowe[\"time\"]; $posty = $rowe[\"posts\"]; print(\"<table width=\"400\" style=\"border-style:dashed;border-color:#666666;border-width:1px \" align=\"center\">\"); print(\"<tr><td style=\"font-size: 11px; font-family: tahoma; \" width=\"100\" valign=\"top\"><table>\"); echo\" <tr><td align=center>\"; ?><img src=\"wyslane<? echo $avatar; ?>\" width=\"80\" height=\"80\"></td></tr><? print(\" <tr><td style=\"font-size: 9px; font-family: tahoma; \">Posts: $posty </td></tr></table></td><td \"); ?>height=\"100%\"<? print(\" <table width=\"310\" height=\"100%\"><tr><td height=\"100%\" style=\"border-style:dashed;border-color:#666666;border-width:1px;font-size:11px; font-family:tahoma;padding-left:8px;padding-top:8px;padding-bottom:8px;padding-right:8px \" valign=\"top\" align=\"left\" width=\"310\"> $info </td></tr>\"); printf(\"<tr><td align=\"right\" valign=\"bottom\" style=\"font-size: 10px; font-family: tahoma; \"> <b>$date</b> $time</td></tr> </table></td></tr></table><br>\"); } } //... reszta skryptu ?>
fragment news.php
<?php function show_comments($id, $cnt) { $type_id='1'; include(\"show_coment.php\"); // oczywisicie w miejscu gdzie maja byc wyswietlane komenty jest show_comments($id, $cnt); ?>
Tabele db:
comments: comment_id art_id type_id user_id COMMENT time date
users: user_id user_name user_mail user_password status gg info time posts avatar ip
Mysle, że wklejiłem cały kod odpowiedzialny za wysiwetlanie komentarzy, jeżeli chodzi o tabele z wszystkimi danymi z show_coment.php to w niej nic nei zminiałem i powinna chodzic. W bazie danych mam wszystkie dane poprawnie zapisane. Prosze o pomoc =]