My site has an index page, and this page checks if a php session is established using:
session_start();
$name = $_SESSION["name"];
if (!$name) {
header('Location: name.php');
}
name.php has a simple form for setting the name (without php) with the setName.php action. setName.php:
session_start();
$_SESSION["name"] = $_POST["name"];
header('Location: index.php');
In every browser except safari (and Webkit Nightly), the user sets his name and returns to the index. However, in S (& WN) Submission of the name form returns to the same page.
Cookies are enabled for all sites, and session ID:

Edit: in case that matters, my server is a macbook with MAMP since php 5.3.
If you want to try this yourself, the url is 121.73.150.105/questions, but it is often disabled.
source
share