Om nah hoo pez nyeetz, alle!
Ist es möglich, das $_POST-array händisch zu füllen etwa für die Weiterleitung nach einem Logout?
~~~php
session_start();
session_destroy();
$hostname = $_SERVER['HTTP_HOST'];
$path = dirname($_SERVER['PHP_SELF']);
$_POST['action'] = 'logout';
header('Location: http://'.$hostname.($path == '/' ? '' : $path).'/index.php');
Ich hielte das für schöner als
`header('Location: http://'.$hostname.($path == '/' ? '' : $path).'/index.php?action=logout');`{:.language-php}
oder gar
`header('Location: http://'.$hostname.($path == '/' ? '' : $path).'/logout.php');`{:.language-php}
Leider ergibt ein Test, dass die erste naiv gedachte Variante nicht funktioniert.
Matthias
--
1/z ist kein Blatt Papier.
![](http://www.billiger-im-urlaub.de/kreis_sw.gif)