Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Sesja lang
chou
post
Post #1





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

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


Witam!

Mam problem z sesją[lang], nie wyświetla mi 'men_pl1' po echo $_SESSION['men1'] tzn.


[index.php]
  1. <?php
  2.  
  3. if(isset($_GET['lang']))
  4. {
  5. $_SESSION['lang'] = $_GET['lang'];
  6. }
  7. else
  8. {
  9. if(!isset($_SESSION['lang']))
  10. {
  11.  
  12. $_SESSION['lang'] = 'en';
  13.  
  14. }
  15. include("lang/" . $lang . ".php");
  16.  }
  17. include("inc/index.html");
  18. ?>


następnie katalog 'inc'
[index.html]
  1. <?php session_start();?>
  2.  
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  4. <title>test</title>
  5. <link rel="stylesheet" type="text/css" href="po/style.css">
  6. ................
  7. <tr>
  8. <td align="middle" bgcolor="#f2f2f2"><A class=podmenu href="po/news.htm" target=srodek ><?php echo $_SESSION['men1'];?></A></td>
  9. </tr>


katalog 'lang'
[pl.php]
  1. <?php
  2.  
  3. $_SESSION['men1'] = 'men_pl1';
  4. $_SESSION['men2'] = 'men_pl2';
  5. $_SESSION['men3'] = 'men_pl3';
  6.  
  7. ?>


czy ktoś widzi błąd i ma ochotę mi wytłumaczyć ?

dzięki

Ten post edytował chou 13.01.2006, 19:26:26
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 - 15:07