Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php] Sesje, są, ale ich nie ma
-Gość_bim-
post 4.04.2006, 13:54:38
Post #1





Goście







Dodaje sesje
  1. <?
  2. switch($link[1]){
  3. default: 
  4. if(zalogowany()) {
  5. $id=$_SESSION[xnick];  echo 'Witaj '.$autorzy[$id].'.';
  6. } else {
  7. echo '<form action="log/" method="POST">
  8. <input type="text" name="nick" class="input"><br>
  9. <input type="text" name="pass" class="input"><br>
  10. <input type="submit" value="Zaloguj" class="input">'; 
  11. }
  12. break;
  13. case 'log': 
  14. $_SESSION['xuser'] = $_POST[nick];
  15. $_SESSION['xpass'] = md5($_POST[pass]);
  16.  
  17.  
  18. echo $_SESSION[xuser];
  19. echo $_SESSION[xpass];
  20.  break;
  21. }
  22.  
  23. ?>
jest to poczatek logowania jakie pisze i kurde nie ddaja sie, a mam na config
  1. <?php
  2. //sesje
  3. error_reporting(E_ALL ^ E_NOTICE);
  4.  $user = $_SESSION['xuser'];
  5.  $passw = $_SESSION['xpass'];
  6. echo $user;
  7. echo $passw;
  8. ?>
help me, mowie odrazu ze includuje congif mam cos w stylu module.php?op=elo winksmiley.jpg sesje w tym 1 pliku sie wyswietlaja a w confi (plik 2)nie help
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 10)
-Gość_bim-
post 4.04.2006, 14:10:51
Post #2





Goście







Dodam jeszcze ze zamiast tej sesji jaka powinna byc wyswietla sie
Kod
d41d8cd98f00b204e9800998ecf8427e
Go to the top of the page
+Quote Post
nickers
post 4.04.2006, 14:29:26
Post #3





Grupa: Zarejestrowani
Postów: 34
Pomógł: 0
Dołączył: 6.02.2006
Skąd: Piła->Kotun();

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


  1. <?php
  2. ?>
smile.gif

ale wyswietlasz potem to co buforujesz questionmark.gif smile.gif


--------------------
Renesansowe Królestwa - gra RPG w średniowieczu. Zapraszam :)
Go to the top of the page
+Quote Post
-Gość_bim-
post 4.04.2006, 14:34:02
Post #4





Goście







Tzn.? Buforuje bo sa problemy z header information. Nakierujmnie ^^
Go to the top of the page
+Quote Post
-Guest-
post 4.04.2006, 14:40:22
Post #5





Goście







a i jak dam:
  1. <?php
  2. echo '<pre>';
  3. print_r($_SESSION);
  4. echo '</pre>';
  5. ?>
To mam to:
  1. <?php
  2. (
  3. [xuser] => 
  4. [xpass] => d41d8cd98f00b204e9800998ecf8427e
  5. )
  6.  
  7.  
  8. ?>
Go to the top of the page
+Quote Post
nickers
post 4.04.2006, 14:51:13
Post #6





Grupa: Zarejestrowani
Postów: 34
Pomógł: 0
Dołączył: 6.02.2006
Skąd: Piła->Kotun();

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


Hmmm, nie wiem, ale moze spradz, czy gdzies nie nadpisujesz $_SESSION['xuser']zamiast porownywac. Haslo jak widac zostaje poprawne, a user jest zerowany.

Sprawdz wszystkie linijki czy nie masz gdzies np.

  1. <?php
  2. if ($_SESSION['xuser'] = ''){...}
  3. ?>


A poza tym to w zamknij formularz i przy $_POST[cos] dawaj identyfikator pola w cudzyslowie( $_POST['nick'] );


--------------------
Renesansowe Królestwa - gra RPG w średniowieczu. Zapraszam :)
Go to the top of the page
+Quote Post
-Gość_bim-
post 4.04.2006, 14:56:49
Post #7





Goście







Wlasnie chodzi o to ze haslo tez jest zle. Byle co wpisze to jest taki sam ciag. Zakonczylem form i to nic nie dalo 9spodziewalem sie) Kurde ale w innym moim systemie dziala. Mam latwe linki i moze dlatego :/
Go to the top of the page
+Quote Post
-Gość_bim-
post 4.04.2006, 15:22:31
Post #8





Goście







dam screna raczej, bo nie kapujecie.
http://nfscg.info/sc.jpg
Go to the top of the page
+Quote Post
-Guest-
post 4.04.2006, 16:17:02
Post #9





Goście







mam blad, cos w themie :/ jak zakomentowalem html i php to dziala wr
Go to the top of the page
+Quote Post
-Gość_bim-
post 4.04.2006, 16:23:03
Post #10





Goście







Sorry za tyle postow ale ja chem them miec jaki mialem. Mozecie powiedziec co moze psuc wsyztsko:
  1. <html>
  2. <head>
  3. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-2">
  4. <META HTTP-EQUIV="Content-Language" CONTENT="pl">
  5. <title>NFS Center Garage | Wszystko o wszystkich Need For Speed</title>
  6.  
  7. <link rel="stylesheet" type="text/css" href="<? echo $adres.'/'.$folder.'/'; ?>theme/default/style.css">
  8. <meta name="description" content="NFS Center Garage - Wszystko o wszystkoch Need For Speed">
  9. <meta name="keywords" content="nd 4 spd, nfscg, nfs center garage, most wanted, mw, underground, ug, nfsu,
     nfsu2, most wanted , mw, underground, nfs, need, for, speed, nfs underground, nf
    s uderground 2, portal, forum, nfs most wanted, need for speed, underground 2, ri
    vals, pc, kody, download, galeria, porady, solucje, tapety, wozy, 1, 2">
  10. <meta name="robots"content="all">
  11. <meta name="copyright" content="Copyright 2006 by NFS Center Garage. All Rights Reserved.">
  12. <meta name="author" content="hzl_91 & x">
  13. <meta name="language" content="pl">
  14. <meta name="revisit-after" content="1">
  15.  
  16. <link REL="shortcut icon" HREF="<? echo $adres.'/'.$folder.'/'; ?>theme/default/favicon.PNG" TYPE="image/x-icon">
  17. <script language="JavaScript" src="java.js"></script>
  18. </head>
  19. <body topmargin="0" leftmargin="0">
  20. <div align="center">
  21. <center>
  22. <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="812" id="AutoNumber1" height="243" background="<? echo $adres.'/'.$folder.'/'; ?>theme/default/gfx/logo.jpg">
  23. <tr>
  24.  <td width="507"><map name="FPMap0">
  25. <area href="index.php" shape="rect" coords="0, 0, 39, 16">
  26. <area target="_blank" href="http://forum.nfscg.info/" shape="rect" coords="39, 0, 88, 16">
  27. <area href="garaz.php" shape="rect" coords="88, 0, 136, 16">
  28. <area href="mail.php" shape="rect" coords="134, 0, 188, 16">
  29. <area href="arty.php?id=89" shape="rect" coords="188, 0, 251, 16">
  30. </map>
  31. <img border="0" src="<? echo $adres.'/'.$folder.'/'; ?>theme/default/gfx/lm1.jpg" usemap="#FPMap0" width="253" height="17"></td>
  32. <td width="191" rowspan="3"><font size="1"><? if(zalogowany()) { ?>Twoja ranga: <? //echo //rangi($id2); ?><br><br>Punkty za:<br>Komenty: <? echo $punkty[2]; ?><br>ShoutBox: <? echo $punkty[4]; ?><br>Newsy: <? echo $punkty[1]; ?><br>Artykuły: <? echo $punkty[0]; ?><br>Download: <? echo $punkty[3]; ?><br>Oneklik: <? echo $punkty[5]; ?><br><br>Dodatkowe punkty: <? echo $punkty[8]; ?> <br>Karne punkty: <? echo $punkty[9]; ?><br><br>Wszystkie punkty: <? echo $punkty[7]; ?></font> <? } else { 
  33. echo '
  34. <table class="tekst"> 
  35. <form method="POST" action="'.$adres.''.$folder.'/mod/login/log/">
  36. <tr><td></td></tr>
  37. <tr>
  38. <TD class="tekst"><b><font size="1">Login: </font><input name="nick" size="10" value="'.$nick.'" class="input"></b> </td><td></td>
  39. </tr>
  40. <tr>  
  41.  
  42. <TD class="tekst"><b><font size="1">Hasło: </font><input type="password" size="10" name="pass" value="'.$pass.'" class="input"></b> </td><td> <input type="submit" value="Zaloguj" class="input"> </td>
  43.  
  44. </tr>
  45. </table></form>
  46.  
  47. '; 
  48. }
  49. ?> 
  50. </td>
  51.  
  52. <td width="113" rowspan="3">
  53.  
  54. <p style="margin-left: 5; margin-top: 0; margin-bottom: 0"><? 
  55. echo'<table valign="top"><tr><td>';
  56.  
  57. if(zalogowany()) {
  58.  
  59. echo '<font size="1">Witaj '.$autorzy[$_SESSION['xuser']].'</font><br>';
  60.  
  61. echo $autorzy_ava[$_SESSION['xuser']].'<br>';
  62.  
  63. echo'<a href="login.php?x=edit">Edycja profilu</a></font><br>
  64. <font size="1"><a href="gar_up_file.php?x=edit">Edytuj swój garaż</a></font>';
  65. if($suma_nieprzeczytane==0) {
  66. echo ' <br><a href="pw.php">Brak nowych PW</a>';
  67. } elseif($suma_nieprzeczytane>0) {
  68. echo ' <br><a href="pw.php"><font color="red">Masz '.$suma_nieprzeczytane.' nowe PW</font></a><BR>';
  69. ?>
  70.  
  71. <?
  72.  
  73. }
  74.  
  75. echo '
  76. <font size="1"><a href="logout.php">Wyloguj się...</a></font>';
  77.  
  78.  
  79.  
  80. } else { echo '<font size="1">Witaj gosciu</font><br><br><font size="1"><a href="login.php?x=add_user">Załóż konto</a></font>'; }
  81.  
  82.  
  83.  
  84. echo '</td></tr></table>';
  85.  
  86.  ?></td>
  87. </tr>
  88. <tr>
  89. <td width="507" height="208">&nbsp;</td>
  90. </tr>
  91. <tr>
  92. <td width="507" height="18"><map name="FPMap1">
  93. <area href="index.php" shape="rect" coords="0, 0, 40, 17">
  94. <area target="_blank" href="http://forum.nfscg.info/" shape="rect" coords="38, 0, 89, 17">
  95. <area href="garaz.php" shape="rect" coords="87, 0, 134, 17">
  96. <area href="arty.php?id=129" shape="rect" coords="134, 0, 192, 17">
  97. <area href="pobieranie.php" shape="rect" coords="191, 0, 256, 17">
  98. <area href="mail.php" shape="rect" coords="255, 0, 311, 17">
  99. </map>
  100. <img border="0" src="<? echo $adres.'/'.$folder.'/'; ?>theme/default/gfx/lm2.jpg" usemap="#FPMap1" width="312" height="18"></td>
  101. </tr>
  102. </table>
  103. </center>
  104. </div>
  105. <div align="center">
  106. <center>
  107. <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="812" id="AutoNumber2" background="<? echo $adres.'/'.$folder.'/'; ?>theme/default/gfx/reklama.jpg" height="81">
  108. <tr>
  109. <td width="154" height="81">&nbsp;</td>
  110. <td width="546" height="81" align="center" valign="top">
  111. <p style="margin-top: 4"><font size="1" face="Arial">
  112. <script type="text/javascript"><!--
  113. google_ad_client = "pub-1017349485322330";
  114. google_ad_width = 468;
  115. google_ad_height = 60;
  116. google_ad_format = "468x60_as";
  117. google_ad_type = "text";
  118. google_ad_channel ="4654159260";
  119. google_color_border = "2B2B2B";
  120. google_color_bg = "000000";
  121. google_color_link = "808080";
  122. google_color_url = "808080";
  123. google_color_text = "FFFFFF";
  124. //--></script>
  125. <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
  126. </script></font></td>
  127. <td width="114" align="center">
  128. <p style="margin-top: 0; margin-bottom: 0"><font size="1">Wykup reklamę:</font></p>
  129. <p style="margin-top: 0; margin-bottom: 0"><font size="1"><a href="arty.php?id=166">Więcej info</a></font></td>
  130. </tr>
  131. </table>
  132. </center>
  133. </div>
  134. <div align="center">
  135. <center>
  136. <div align="center">
  137. <center>
  138. <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="812" id="AutoNumber5">
  139. <tr>
  140. <? if($co=='l' OR $co=='all'){ ?>
  141. <td background="<? echo $adres.'/'.$folder.'/'; ?>theme/default/gfx/m2.jpg" align="center" valign="top" width="154">lewe menu<? //left_menu(); ?><br>
  142. &nbsp;</td>
  143. <? } ?>
  144. <? if($co=='b' OR $co=='p' OR $co=='l' OR $co=='all'){ ?>
  145. <td width="390" bgcolor="#232323" align="center" valign="top"><? top(); ?></td>
  146. <? } ?>
  147.  <? if($co=='p' OR $co=='all'){ ?>
  148.  <td width="154" background="<? echo $adres.'/'.$folder.'/'; ?>theme/default/gfx/m2.jpg" align="center" valign="top">
  149. prawe menu<? //right_menu(); ?><br>
  150. &nbsp;</td>
  151. <? } ?>
  152. <td width="114" background="<? echo $adres.'/'.$folder.'/'; ?>theme/default/gfx/h1.jpg" align="center" valign="top">
  153. <? //reklama_menu(); ?></td>
  154. </tr>
  155. </table>
  156. </center>
  157. </div>
  158. <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="812" id="AutoNumber4" background="<? echo $adres.'/'.$folder.'/'; ?>theme/default/gfx/stopka.jpg" height="100">
  159.  
  160. <tr>
  161. <td width="545" align="center" valign="top">
  162. <p style="margin-top: 0; margin-bottom: 0"><font class="menu_nazwa">§ </font><font class="font"><font size="1">Wszystkie 
  163. grafiki są zastrzeżone prawami autorskimi.</font></p>
  164. <p style="margin-top: 0; margin-bottom: 0"><font class="menu_nazwa">§ </font><font class="font">Wszystkie 
  165. artykuły i newsy dotyczą praw, które daje im nasza
  166. <a href="arty.php?id=89">NIETYKIETA</a>.</font></p>
  167. <p style="margin-top: 0; margin-bottom: 0"><font class="menu_nazwa">§ </font><font class="font">Skrypty użyte na 
  168. stronie są własnością NFSCG.info</font></p>
  169. <p style="margin-top: 0; margin-bottom: 0"><font class="menu_nazwa">§ </font><font class="font">All Rights Reserved. Wszystkie Prawa Zastrzeżone.</font>
  170. <p>
  171. <font class="font"></font>  
  172. <p>
  173. <font class="font"></font>
  174. </td>
  175. <td width="152">
  176. <p style="margin-left: 10; margin-top: 0; margin-bottom: 0">
  177. <font class="menu_nazwa">Design:</font><font class="font"> hzl_91</font></p>
  178. <p style="margin-left: 10; margin-top: 0; margin-bottom: 0">
  179. <font class="menu_nazwa">CMS:</font> <a href="info.php"><font class="font">X-Trim v 2.0</font></a></p>
  180. <p style="margin-left: 10; margin-top: 0; margin-bottom: 0">
  181. <font class="menu_nazwa">Sponsor: </font><font class="font"><a target="_blank" href="http://gry.funday.pl/">GRY.FunDay.pl</a></font><p style="margin-left: 10; margin-top: 0; margin-bottom: 0">
  182. <p style="margin-left: 10; margin-top: 0; margin-bottom: 0">
  183. </td>
  184. <td width="114" align="center"><font class="menu_nazwa">§</font><font class="font"> Wirtualnie chroni nas:</font><p>
  185. <font size="1"><a target="_blank" href="http://www.bowi.org.pl/">BOWI 
  186. Group</a></font></td> </tr>
  187. </table>
  188. </center>
  189. </div>
  190.  
  191. <center><table>
  192. <tr><td class="adm"></td></tr>
  193. <table>
  194. <tr><td class="adm">
  195.  
  196.  
  197. <? echo 'Ilosc zapytan: '.$zap; ?>
  198. </body>
  199. </html>
Go to the top of the page
+Quote Post
nickers
post 6.04.2006, 17:24:57
Post #11





Grupa: Zarejestrowani
Postów: 34
Pomógł: 0
Dołączył: 6.02.2006
Skąd: Piła->Kotun();

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


Hey, wiem, ze to glupie smile.gif ale wyczysc se cache przegladarki smile.gif

Moze przegladarka nie odswieza tej strony smile.gif tzn. jesli jest to ramka, albo ta sama strona czy cos, bo nie wiem co innego moze byc :/


--------------------
Renesansowe Królestwa - gra RPG w średniowieczu. Zapraszam :)
Go to the top of the page
+Quote Post

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 Wersja Lo-Fi Aktualny czas: 24.07.2025 - 21:46