Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [MySQL][PHP]<title> w mysql
Marcinekk
post
Post #1





Grupa: Zarejestrowani
Postów: 97
Pomógł: 0
Dołączył: 27.09.2013

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


Siema, tworzę skrypt, dzięki któremu treść w <title> będzie pobierana z mysql`a.

Lecz mam taki problem :

Kod
Warning: mysql_query(): Access denied for user ''@'localhost' (using password: NO) in /usr/home/marcin1465/domains/marcinek-yt.ct8.pl/public_html/header.php on line 8 Warning: mysql_query(): A link to the server could not be established in /usr/home/marcin1465/domains/marcinek-yt.ct8.pl/public_html/header.php on line 8 Warning: mysql_fetch_row() expects parameter 1 to be resource, null given in /usr/home/marcin1465/domains/marcinek-yt.ct8.pl/public_html/header.php on line 9


Kod :

  1. <?php
  2.  
  3. <html>
  4. <head>
  5. ';
  6.  
  7. $resultt = mysql_query("SELECT Count(id) FROM `head`");
  8. $rowe = mysql_fetch_row($result);
  9. $count_userss = $row[0];
  10.  
  11. if($count_userss > 0) {
  12. $result = mysql_query("SELECT * FROM `head` ORDER BY `id`");
  13. while($rowe = mysql_fetch_assoc($resultt)) {
  14.  
  15. echo '
  16.  
  17. <title>'.$row['tresc'].'</title>
  18. ';
  19.  
  20.  
  21.  
  22. }
  23. }else{
  24. // jeśli nie ma w ogóle to wyświetlamy komunikat
  25. echo '<title>None</title>';
  26. }
  27. <link href="css/style.css" rel="stylesheet" type="text/css" />
  28. </head>
  29. <body>';
  30.  
  31.  
  32.  
  33. ?>


Linia 8
  1. $resultt = mysql_query("SELECT Count(id) FROM `head`");


Linia 9

  1. $rowe = mysql_fetch_row($result);


Dodam jeszcze, że jak zaincluduje config to wywala kolejne błędy..

Proszę o pomoc, ponieważ na tej samej zasadzie zrobiłem stopke i normalnie działa, a tutaj nic.
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: 22.08.2025 - 14:38