redarrow Posted June 11, 2006 Share Posted June 11, 2006 if a user reads a message i wont to delete that message.order i got ita user press read message then the database gets updated that the message was readand a time when that message was read.so i want to detete that message 5 mins afther the user has press read messageexample.on read.php[code]<?updat the member messages with time and have_read.$have_read="yes";$have_read=$_POST($have_read)$time=date(h:i:s);$time=$_POST($time);$query="update member_messages set have_read='$have_read' and time='$read_time' where id='$id'";$result=mysql_query($query);$query="select * from member_messages where id='$id'";$result=mysql_query($query);$row=mysql_fetch_assoc($result)) {if ($row['have_read'] >0) {$time=$row['time_read'];$delete_message=array("$time");$m=+5$query="delete member_message where id=$id";$result=mysql_fetch($query);}}[/code]so i need a way to deleta a mess afther 5 min afther the user has read that message please help cheers. Link to comment https://forums.phpfreaks.com/topic/11722-delete-message-via-timein-database/ Share on other sites More sharing options...
redarrow Posted June 11, 2006 Author Share Posted June 11, 2006 how do i extract the time above code and alter the minites Link to comment https://forums.phpfreaks.com/topic/11722-delete-message-via-timein-database/#findComment-44360 Share on other sites More sharing options...
redarrow Posted June 11, 2006 Author Share Posted June 11, 2006 When i land on the message page wont to self post the following cheers.read_time and have_read cheers.[code]$read_time=date("h:i:m");$have_read="yes";$query="update member_messages set $have_read and read_time='$read_time' where id='$id'";$result=mysql_query($query);[/code] Link to comment https://forums.phpfreaks.com/topic/11722-delete-message-via-timein-database/#findComment-44374 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.