Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [MySQL][PHP]Na kompie działa, na serwie nie
Komiłaj
post
Post #1





Grupa: Zarejestrowani
Postów: 31
Pomógł: 0
Dołączył: 10.12.2010

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


Kiedy uruchamiam skrypt na WebServie na kompie wszystko OK, tak jak chciałem i perfekt, a na 2ap.pl wywala mi:
Kod
Notice: Undefined variable: site in .../public_html/index.php on line 15

O co chodzi?

index.php:
  1. <?php
  2. include('includes/header.php');
  3. include('includes/menu.php');
  4.  
  5. ini_set('display_errors','1');
  6.  
  7.  
  8. if(!isset($_GET['site']));
  9. $_GET['site'] = 1;
  10.  
  11. $siteID = $_GET['site'];
  12.  
  13.  
  14. $query = mysql_query("SELECT tytul,tresc FROM strony WHERE id = '".$site."'");
  15.  
  16. ?>
  17.  
  18. <div id="glownaczesc" style="background-image: url(imagesy/body.png); width: 767px; height: 557px; float:left;">
  19. <div style="margin-left:45px; margin-top:30px; margin-right:60px; margin-bottom:30px; text-align:justify;">
  20.  
  21.  
  22.  
  23. <?php
  24.  
  25.  
  26.  
  27. while ($row = mysql_fetch_array($query))
  28. {
  29. echo "<b>".$row['tytul']."</b><br />";
  30. echo $row['tresc'];
  31. echo '<br />';
  32. }
  33. ?>
  34.  
  35. </div>
  36. </div>
  37.  
  38. <?php
  39.  
  40.  
  41.  
  42.  
  43. include('includes/footer.php');
  44. ?>
  45.  
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 25.08.2025 - 07:36