Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> cos jest nie tak, wildcard + mysql + php niby dobrze ale n
picer
post
Post #1





Grupa: Zarejestrowani
Postów: 18
Pomógł: 0
Dołączył: 5.07.2004

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


  1. <?
  2. // includacje etc 
  3. $str = str_replace( 'www.', '', $_SERVER['HTTP_HOST'] ); 
  4. $subdomena = explode('.',$str); 
  5. $data_dzisiejsza = sprintf(&#092;"%04d-%02d-%02d \", 
  6. date(&#092;"Y\"), date(\"m\"), date(\"d\")); 
  7. if($subdomena[0] <> 'webpacket') { 
  8. $subdomena_po = $subdomena[0]; 
  9. $r = mysql_query(&#092;"SELECT user_id,username FROM users WHERE username='$subdomena_po'\"); 
  10. $num = mysql_num_rows($r); 
  11. $rr = mysql_fetch_array($r); 
  12. if($num == 1) { 
  13. $ble = mysql_query(&#092;"SELECT usluga_sms,data_usluga_sms FROM users_next WHERE user_id = '\".$rr['user_id'].\"' AND usluga_sms = 1 AND data_usluga_sms > '$data_dzisiejsza' OR data_usluga_sms = 1\"); 
  14. $num1 = mysql_num_rows($ble); 
  15. if($num1 == 1) { 
  16. header(&#092;"Location: \".append_sid(\"http://www.webpacket.net/members.php?id=$rr[username]\")); 
  17. } 
  18. else { 
  19. header(&#092;"Location: \".append_sid(\"http://www.webpacket.net/\")); 
  20. } 
  21. } 
  22. else { 
  23. header(&#092;"Location: \".append_sid(\"http://www.webpacket.net/\")); 
  24. } 
  25. // dalszy kod
  26. ?>

no własnie przeanalizowałem kilka razy ten kod i nic :|
moze znajdziecie jakis bład (IMG:http://forum.php.pl/style_emoticons/default/sad.gif) ((
sparawdzałem zapytania nazwy itd wszystko sie zgadza mysql_error nic nie wykazuje HTTP_HOST daje mi poprawny adres wogole nie iwem co jest grane (IMG:http://forum.php.pl/style_emoticons/default/sad.gif) (
Go to the top of the page
+Quote Post

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 - 23:46