FRIHOSTFORUMSSEARCHFAQTOSBLOGSCOMPETITIONS
You are invited to Log in or Register a free Frihost Account!


server 4 not working code





gerimter
Why this code does not work anymore in server 4?
Code:
<?
$sql=mysql_query("select * from banner  ORDER by id DESC LIMIT 0,18");
$sayi=mysql_num_rows($sql);
if ($sayi == 0) { echo "Hiç Haber Girilmemi&thorn;"; } else { ?>
<table border="0" cellspacing="2" width="86%" align="center">
 <? $count = 0;
 while($row=mysql_fetch_array($sql)) {
   $resim   = $row["resim"];
   
   if (!file_exists($resim))
   {
    $resim   = "images/icerik_res/haberler/haber_yok.jpg";
   
   
   }
   $ozet   = substr(nl2br(stripslashes($row["haber"])),0,80);
  $str = "<a href=sayfalama/makaleler.php?id=".$row[id]."> </a>";
 if ($count==9) {    // burdaki 2 rakami kaç kolon olacagi  ?>
 <tr>
 <? $count = 0;
 } ?>
<td style='border-left-style: solid; border-left-width: 1px; border-top-style: solid; border-top-width: 0px; border-bottom-style: solid; border-bottom-width: 1px' width="50%" valign='top'>

<?php
echo '<font face="Tahoma" size="2">';
echo "<a href=sayfalama/makaleler.php?id=".$row[id].">". $row["yazi"]."</a><br>";
echo "<img border='1' src='$row[resim]' width='100' align='left'>" . $ozet . $str. "";



echo '</font>';
Bondings
Which error do you get?
gerimter
Bondings wrote:
Which error do you get?

echo does not list the data.
There was one week before the problem.
cybersa
Did you connected to your database correctly?
or
Post the complete code.
Fire Boar
The code you provided looks incomplete, and as such it is impossible to understand what it is meant to do. If it is complete... well, there's your problem.
gerimter
Code:
<?
ini_set('error_reporting', E_ALL^E_NOTICE);
include "include/ayarlar.php";
?>
<?
$sql=mysql_query("select * from banner  ORDER by id DESC LIMIT 0,18");
$sayi=mysql_num_rows($sql);
if ($sayi == 0) { echo "Hiç Haber Girilmemi&thorn;"; } else { ?>
<table border="0" cellspacing="2" width="86%" align="center">
 <? $count = 0;
 while($row=mysql_fetch_array($sql)) {
   $resim   = $row["resim"];
   
   if (!file_exists($resim))
   {
    $resim   = "images/icerik_res/haberler/haber_yok.jpg";
   
   
   }
   $ozet   = substr(nl2br(stripslashes($row["haber"])),0,80);
  $str = "<a href=sayfalama/makaleler.php?id=".$row[id]."> </a>";
 if ($count==9) {    // burdaki 2 rakami kaç kolon olacagi  ?>
 <tr>
 <? $count = 0;
 } ?>
<td style='border-left-style: solid; border-left-width: 1px; border-top-style: solid; border-top-width: 0px; border-bottom-style: solid; border-bottom-width: 1px' width="50%" valign='top'>

<?php
echo '<font face="Tahoma" size="2">';
echo "<a href=sayfalama/makaleler.php?id=".$row[id].">". $row["yazi"]."</a><br>";
echo "<img border='1' src='$row[resim]' width='100' align='left'>" . $ozet . $str. "";



echo '</font>';
?>

 <?
 $count++;
 if ($count==4) { // burdaki 2 rakami kaç kolon olacagi ?>
 </tr>
 <? } ?>
 </td>
 <? } ?>
</table>
 <?
     }
 ?>
</body>

</html>
gerimter
Code:
<?
application does not work
Code:
<?php
working Smile Do not you have your work without php tag?
Related topics
Server 4 opened for new accounts
php not on?
mod_python server 4
server 4 - down for at least a week
time on server 4
server 4 down?
server 4 - down
Python - Django Framework in server 4?
SMTP on Server 4?
[Server 4] Mod_python
Up and running in server 4
Server 4 currently down (old topic, it it working again)
Server 4 problems (17-20-01-2012)
Mod_python not working on server 4
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.