ma allora fai una cosa piu subdola
Ti crei una tabella nel db che chiamiamo email
dove ci metti :
id
emailcliente
testo
lettura
Poi metti : (nel file di segnalazione)
Codice PHP:
Insert into email (emailcliente , testo, lettura) VALUES ($emailcliente, $testo, 1)
A qeusto punto ti fai la paginetta per la lettura
Codice PHP:
include "config.php";
$db = mysql_connect("$server", "$username", "$password");
mysql_select_db("$database",$db);
$sql = ("SELECT * from email where lettura = 1 ");
$row_sql = mysql_query($sql) Or DIE (mysql_error());
$valori = mysql_num_rows($row_sql);
while ($data = mysql_fetch_object($row_sql))
{
echo "Nel db ci sono $valori non lette";
echo "<a href=leggiemail.php?$data->id>$data->emailcliente</>";
}
e a questo punto ti fai il file leggiemail.php piu o meno cosi :
Codice PHP:
$sql = ("SELECT * from email where id ='$_GET[id]' ");
$row_sql = mysql_query($sql) Or DIE (mysql_error());
$valori = mysql_num_rows($row_sql);
while ($data = mysql_fetch_object($row_sql))
{
echo "Indirizzo di posta : $data->emailcliente";
echo "Testo : $data->testo";
}
$sql = ("update email set lettura = '0' where id ='$_GET[id]'"); //cosi non ti capita di leggere 2 volte la stessa email