Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]header
glass
post
Post #1





Grupa: Zarejestrowani
Postów: 94
Pomógł: 0
Dołączył: 23.03.2007
Skąd: United Kingdom

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


Witam szukałem trochę ale nie umie znaleźć czy jest możliwe ustawić tak
Kod
header('Location: http://bogatyojciec.pl/?A=48395');
.. by razem z przekierowaniem otwierał stronę w nowej karcie?

Mam w potrzebie formularz z polem select i listę z dwoma wyborami, każdy z nich to inny link, chyba że da się to zrobić inaczej?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
DREEMus
post
Post #2





Grupa: Zarejestrowani
Postów: 286
Pomógł: 34
Dołączył: 4.09.2008
Skąd: Wrocław

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


hmm, a nie możesz sobie zrobić pliku re.php który Ci zrobi przkierowanie i otworzy popup? Czy to musi być nowa strona/zakładka (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)

czemu nikt nie sprawdza przykładów pod funkcjami w manualu (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)

  1. <?php
  2. //This works in 5.2.3
  3. //First function turns SSL on if it is off.
  4. //Second function detects if SSL is on, if it is, turns it off.
  5.  
  6. //==== Redirect... Try PHP header redirect, then Java redirect, then try http redirect.:
  7. function redirect($url){
  8.    if (!headers_sent()){    //If headers not sent yet... then do php redirect
  9.        header('Location: '.$url); exit;
  10.    }else{                    //If headers are sent... do java redirect... if java disabled, do html redirect.
  11.        echo '<script type="text/javascript">';
  12.        echo 'window.location.href="'.$url.'";';
  13.        echo '</script>';
  14.        echo '<noscript>';
  15.        echo '<meta http-equiv="refresh" content="0;url='.$url.'" />';
  16.        echo '</noscript>'; exit;
  17.    }
  18. }//==== End -- Redirect
  19. ?>

Przerób sobie na własne potrzeby (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

Ten post edytował DREEMus 18.04.2009, 20:04:39
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: 26.12.2025 - 00:40