Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> nie ysietla, przez parametr
patab
post
Post #1





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 4.04.2008

Ostrzeżenie: (0%)
-----


Kod
  <?
          
            include("dane.php");
               mysql_connect($localhost, $log_host, $has_host) or
             die ("Nie mozna poalczyc sie z tabela");
             mysql_select_db($nazwa_bazy) or
             die ("nie mozna sie poalczyc z baza");
    
    
           if (isset($nr)>0)  
           {
             $wynik = mysql_query("SELECT * FROM news WHERE nr=".$nr." AND ok=1;");
             if ($rekord = mysql_fetch_array($wynik))
             {
                 print("<h1>".$rekord[2]."</h1>");
                 print("<p>".$rekord[4]."</p>");
                 print("<p align=right>".$rekord[5].", ".$rekord[1]."</p>");    
                 print("");
             }
             else {
                 print "<p>Nie ma newsa to takim numerze</p>";            
             }
             print '<p><a href="news.php">Wszystkie newsy</a></p>';
         }
         else {
             print "<p>Newsy</p>";
             $wynik1 = mysql_query("SELECT * FROM news WHERE ok=1 ORDER BY nr DESC;");
             while ($rekord = mysql_fetch_array($wynik1)){
         print "    <p><strong>".$rekord[1]."</strong>
".$rekord[3]." </p>";
           print "<p align=\"right\"><a href=\"news.php?nr=".$rekord[0]."\"><img src=\"images/btn-details.gif\"  ";
         print "  width=\"53\"height=\"16\" border=\"0\"></a></p>";
     }    
            
         }
          
           ?>



Na localhoscie dzila mi to bardzo dobrze, ale na serwerze juz nie, chodzi o linijkie if (isset($nr)>0)
nie wyswietla pojedynczego newsa
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.08.2025 - 21:50