Originariamente inviato da PaTeR
mi dai il codice completo?
come fai ad andare da connection a list?
uso un link, ho satmpato il vettore $_SESSION in connection.php e me lo scrive correttamente, il codice e' il seguente:
connection.php
codice:
<?php
session_start();
$_SESSION['user'] = "user";
$_SESSION['pass'] = "password";
print_r($_SESSION);
?>
<html>
<head>
<title>Connessione</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
lista
</body>
</html>
lo script in list.php e':
codice:
<?php
//session_name('name');
session_start();
$user = $_SESSION['user'];
$pass = $_SESSION['pass'];
$uid = $_GET['uid'];
print_r($_SESSION);
echo session_id().'
';
echo $user;
$mbox = imap_open("{pop.tiscali.it:110/pop3}INBOX", $user, $pass);
$msgnumber = imap_num_msg($mbox);
function lista($mbox, $totnum){
for($i=1; $i <= $totnum; $i++){
$overview = imap_fetch_overview($mbox, $i, 0);
if (is_array($overview)){
reset($overview);
while (list($key, $value) = each($overview)){
$uid = imap_uid($mbox, $i);
echo "<tr>\n
<td>".$value->from."</td>\n
<td><a href=\"list.php?uid=".$uid."\">".$value->subject."</a></td>\n
<td>".$value->date."</td>\n
</tr>\n";
}
}//end if
}// end for (scan of all messages)
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Lista e-mail</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table cellpadding="0" cellspacing="0" border="1">
<?php lista($mbox, $msgnumber);?>
</table>
<table width="600" cellpadding="0" cellspacing="0" border="1">
<tr>
<td>
<iframe frameborder="0" width="600" height="450" src="fetch.php?uid=<?php echo $uid?>" marginheight="0" marginwidth="0"></iframe>
</td>
</tr>
</table>
</body>
</html>
<?php imap_close($mbox);?>
Grazie per la vostra disponibilita'