Jump to content

Recommended Posts

if a user reads a message i wont to delete that message.


order i got it

a user press read message then the database gets updated that the message was read
and a time when that message was read.

so i want to detete that message 5 mins afther the user has press read message

example.

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

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]
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.