Hi, there
I have a problem to set the unread msg.Well, actually i can say i know nothing about this system. What i do is i have a field in database call open
and in the send mail form i put a hidden input name =open value=N
when customer click to send the mail the value N will be put in the field open in database.
My question is how can i do it when the customer open their msg the value N will change to be Y in database,so that will let us know that mail was open ?
please help me
Thank you
Paitoon
This should be pretty simple. If your already writing queries as It seems you are, you just need an update query on what ever page the viewer will look at the mail.
Lets say when the user clicks a link to read the message you are passing the ID of the message in the URL, so the page knows which message to open. Your query could look like this:
[PHP]//set a variable for the mail id
$mailid=$_GET['mailid'];
$sql="UPDATE myMailTable SET myMailTable.open = 'n' WHERE myMailTable.mailid = $mailid;";[/PHP]
If this isn't clear enough, post back and we'll go from there.
Greg