Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [php]Problem Ze zmienną w sesjach., (Mam problem)
matik000
post
Post #1





Grupa: Zarejestrowani
Postów: 78
Pomógł: 0
Dołączył: 23.06.2007

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


Zobaczcie gdzie ja mam błąd.Prosze o pomoc.już 5 dni się z tym morduje.
te pliki mają dodawać 3 do zmiennej w sesjach z pamięcią.



index.php
  1. <html>
  2. <a href="praca.php">pracuj</a>
  3. <?
  4. function sesja(){
  5. $_SESSION['count'] = 0;
  6. echo 'Siła: '.$_SESSION['count'].' ';
  7. }
  8. sesja();
  9. ?>

praca.php
  1. <html>
  2. <a href="index.php">główna</a>
  3. <?php
  4. $_SESSION += 3;
  5. sesja();
  6. ?>
Go to the top of the page
+Quote Post
Cysiaczek
post
Post #2





Grupa: Moderatorzy
Postów: 4 465
Pomógł: 137
Dołączył: 26.03.2004
Skąd: Gorzów Wlkp.




1. Wysyłasz nagłówki przed session_start() (wysyłasz znaki do przeglądarki)
2. $_SESSION += 3; <--- co to jest?

  1. <?
  2. function sesja(){
  3. $_SESSION['count'] = 0;
  4. echo 'Siła: '.$_SESSION['count'].' ';
  5. }
  6. sesja();
  7. ?>
  8. <html>
  9. <a href="praca.php">pracuj</a>


  1. <?php
  2. sesja();
  3. $_SESSION['count'] += 3;
  4.  
  5. ?>
  6. <html>
  7. <a href="index.php">główna</a>


--------------------
To think for yourself you must question authority and
learn how to put yourself in a state of vulnerable, open-mindedness;
chaotic, confused, vulnerability, to inform yourself.
Think for yourself. Question authority.
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 Aktualny czas: 21.08.2025 - 14:56