Jump to content


Photo

delete message via timein database


  • Please log in to reply
2 replies to this topic

#1 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 11 June 2006 - 04:50 PM

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
<?

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);
}
}



so i need a way to deleta a mess afther 5 min afther the
user has read that message please help cheers.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#2 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 11 June 2006 - 06:33 PM

how do i extract the time above code and alter the minites
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#3 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 11 June 2006 - 07:19 PM

When i land on the message page wont to self post the following cheers.

read_time and have_read cheers.


$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);


Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users