Jump to content

People who click refresh send 1000 messages


npsari

Recommended Posts

Hello guys,

 

How can subtract time

 

I want to write (if time passed is less that 30 seconds,)

 

how can i write that

i did it this way time_message< '30' but seems wrong

 

My code:

$tim = localtime(time(),true);
$Time=($tim['tm_hour'].":".$tim['tm_min'].":".$tim['tm_sec']);

$qT = "SELECT * FROM message WHERE SENDER_PROFILE='$sender_id' AND profile_message='$sent_to_id' AND time_message< '30' ";
$rT = @mysql_query($qT,$con); 

if(mysql_num_rows($rT)>0){ /// ---------> TO DISABLE CLICKING REFRESH 1000000 TIMES
print"Why sending it 2 times, there is no need!";
}else{ /// ---------> TO DISABLE CLICKING REFRESH 1000000 TIMES
print"Message sent!";
} /// ---------> TO DISABLE CLICKING REFRESH 1000000 TIMES

 

Because i dont want the same message to be sent in 30 seconds

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.