Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Problem z Refresh, Proszę o pomoc
Snap
post
Post #1





Grupa: Zarejestrowani
Postów: 75
Pomógł: 4
Dołączył: 29.05.2005

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


Witam (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif)
Mam mały problem z pewnym skryptem, oto on (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif)

Przedstawiam Państwu mój skrypt wylogowania (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif)
Problem w tym że nie che mi odświeżyć strony za pierwszym kliknięciem (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif)

  1. <?php
  2. ....
  3. if(isset($_SESSION['admin']))
  4. {
  5.  echo '<b>Witaj: '.$admin.' </b><br>';
  6.  
  7.  echo '<form method="post" action="index.php?a=logout"><input type="submit" value="Logout" name="submit" class="submit" /></form>';
  8.  
  9. if($_GET['a'] == logout) 
  10. {
  11. echo '<META HTTP-EQUIV="Refresh" CONTENT="1; URL=index.php">';
  12. }
  13. } else {
  14. ....
  15. ?>

Proszę o pomoc (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif)

Ten post edytował Snap 2.03.2007, 11:18:45
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Snap
post
Post #2





Grupa: Zarejestrowani
Postów: 75
Pomógł: 4
Dołączył: 29.05.2005

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


Chodzi Ci o Skrypt
  1. <?php
  2. if(isset($_SESSION['admin']))
  3. {
  4.  echo '<b>Witaj: '.$admin.' </b><br>';
  5.  
  6.  echo '<form method="post" action="index.php?a=logout"><input type="submit" value="Logout" name="submit" class="submit" /></form>';
  7.  
  8. if($_GET['a'] == logout) 
  9. {
  10. }
  11. } else {
  12. ?>

czy o cały plik ?

Cytat(misiek172 @ 2.03.2007, 13:26:30 ) *
hmm no to błąd jest w innym miejscu... (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

Tylko że mi nigdzie błędu nie wywala :/ Poprostu muszę 2x kliknąć w przycisk i żadne refresh, location nic nie zmienia, trzeba 2x kliknać

Ten post edytował Snap 2.03.2007, 13:37:07
Go to the top of the page
+Quote Post
heaven
post
Post #3





Grupa: Nieautoryzowani
Postów: 92
Pomógł: 15
Dołączył: 21.10.2006

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


  1. <?php
  2. if(isset($_SESSION['admin']))
  3. {
  4.  echo '<b>Witaj: '.$admin.' </b><br>';
  5.  
  6.  echo '<form method="post" action="index.php?a=logout"><input type="submit" value="Logout" name="submit" class="submit" /></form>';
  7.  
  8. if($_GET['a'] == logout) 
  9. {
  10.  header('Location: index.php');
  11. }
  12. } else {
  13. ?>

i to nie dziala?(IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) tylko ob_start musi byc na samym poczatku pliku ktory wywolywany jest z przegladarki
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: 4.10.2025 - 13:48