Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> warunek if...
boosik01
post
Post #1





Grupa: Zarejestrowani
Postów: 91
Pomógł: 1
Dołączył: 19.08.2009

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


Cześć. Dlaczego w poniższym kodzie nie wykonuje się kod w ifie? Mimo że jeśli na 100% warunek jest spełniony....

  1. if($mess['receive'] == $id or $mess['receive'] == $player->login)
  2. {
  3. $read_mess = $pdo -> prepare('SELECT * FROM messages WHERE sender=? or sender=?');
  4. $read_mess->execute(array($_GET['id'], $player->login));
  5. foreach($read_mess as $read_messages)
  6. {
  7. $read_messages1[] = $read_messages;
  8. }
  9. $read_mess -> closeCursor();
  10.  
  11. }
  12. else
  13. {
  14. $error = form_field('Błąd', 'error');
  15. }
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: 23.08.2025 - 16:22