Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php/mysql]problem z wyświetleniem komunikatu
Sadu2
post
Post #1





Grupa: Zarejestrowani
Postów: 229
Pomógł: 13
Dołączył: 31.05.2007

Ostrzeżenie: (10%)
X----


Witam,
Kombinuje, kombinuje ale coś mi nie wychodzi. Pokaże moje cudo:

baza:

###directory###
id, uid, title, link


  1. <?php
  2. $zapytanie="Select COUNT(*) FROM directory where uid=".$_SESSION["userid"]."";
  3. $num=mysql_fetch_row(mysql_query($zapytanie));
  4.  
  5.  
  6. if ($num["uid"] == 1) {
  7. $mess = "test";
  8. } elseif ($num["uid"] == 3) {
  9. $mess = "test2";
  10. } elseif ($num["uid"] == 8) {
  11. $mess = "test3";
  12. }
  13.  
  14. if( ($num<$_SESSION["userid"]))
  15. {
  16.  
  17. //TUTAJ MAM FORMULARZ
  18.  
  19. } else {
  20.  
  21. echo "<div class=\"error_message\"><div class=\"title\" style=\"margin:0\">".$mess."</div></div>";
  22.  
  23. }
  24. ?>



W zależności od konta, użytkownik może dodać 1,3 lub 8 linków. I chciałbym uzyskać taki efekt (użytkownik z najniższym kontem), że jak doda jednego linka to mu sie pokaże: $mess czyli: test

Niestety, jeszcze nie dodałem żadnego linku, a formularz jest ukryty oraz nie wyświetla się żaden komunikat.
Jakieś sugestie?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Sadu2
post
Post #2





Grupa: Zarejestrowani
Postów: 229
Pomógł: 13
Dołączył: 31.05.2007

Ostrzeżenie: (10%)
X----


No tego to nie wiedziałem. Jestem początkujący, więc możesz mnie jakoś nakierować?
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 - 04:45