Allora: posto subito le 3 pagine che DOVREBBERO utilizzare le sessioni in teoria:
Spoiler:
a.php
Codice:
<?php @session_start();
echo $_SESSION['password'];
echo"asd";
?>
check.php
Codice:
<?php
if(isset($_POST['username'])){
@session_start();
$_SESSION['username'] = $_POST['username'];
$_SESSION['password'] = $_POST['password'];
//header("location: ./it/index.php");
header("location: a.php"); }
else header("location: index.php"); ?>
index.html
Codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head> <title> a </title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head>
<body>
<div id="userlogin">
<div style="margin-top:100px;">
<h2>Login </h2>
<form action="check.php" method="post" id="formlogin">
<div> <input type="text" name="username" id="username" /> <label for="username">Username</label> <input type="password" name="password" id="password" /> <label for="password">Password</label>
<input type="submit" class="submit" value="Loggati " />
</div>
</form>
</div>
</div>
</body>
</html>
la index è senza lo style ma va cmq.
ecco il problema: con firefox e con IE6 la sessione funziona a meraviglia, ma con IE7 no. non mi vuole proprio mantenere i dati della sessione e non capisco perchè...
ho già cercato con google x vedere se trovavo qualcosa di utile ma non ho trovato nulla che funzionasse davvero..
Qualcuno mi sa dire cosa sbaglio?