Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Pomocy PHP GET
sonquer
post
Post #1





Grupa: Zarejestrowani
Postów: 21
Pomógł: 0
Dołączył: 21.08.2012

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


Czemu ten skrypt nie działa ?

Zamiast id=1 i id=2 mam podstawione $row['id'];

____________________________________________

  1. <? include 'cfg.php';
  2.  
  3. $sql = mysql_query("SELECT * FROM forum_temat");
  4.  
  5. $show = (int)$_GET['show'];
  6. $id = $_GET['id'];
  7.  
  8. switch($show):
  9. case 1:
  10. for($i=0; $i<$row=mysql_fetch_assoc($sql); $i++){
  11.  
  12. if($row['dzial'] == pp){
  13. echo '<a href="index.php?id='.$row[id].'">'.$row['temat'].'</a>';
  14. echo "</br>";
  15. }
  16. }
  17. break;
  18. case 2:
  19. for($i=0; $i<$row=mysql_fetch_assoc($sql); $i++){
  20.  
  21. if($row['dzial'] == dorg){
  22. echo '<a href="index.php?id='.$row[id].'">'.$row['temat'].'</a>';
  23. echo "</br>";
  24. }
  25. }
  26. break;
  27. default:
  28.  
  29. echo '<a href="index.php?show=1">Pierwsza Pomoc</a>';
  30. echo "</br>";
  31. echo '<a href="index.php?show=2">Dyskusje o rozwoju Gry</a>';
  32.  
  33. break;
  34. endswitch;
  35.  
  36. if($id == 1){
  37. echo 'test';
  38. }
  39.  
  40. if($id == 2){
  41. echo 'test2';
  42. }
  43. ?>
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: 19.08.2025 - 17:04