Basically, I have a message system on my site and sometimes when a user refreshes their screen or "back buttons" to the page and resends the message the receipent obviously gets the message twice or even three times. So, I want to check the database prior to a message being sent to see if a message has been sent from the same user to the same user within 200 seconds and if it has, to not send it agan. I apologize for being a beginner programmer/coder but we all have to start somewhere. Here is the code prior to my poor attempt to modify it: [code] $sql_query="insert into network (mem_id,frd_id) values ($m_id,$frm->frm_id),($frm->frm_id,$m_id)"; sql_execute($sql_query,''); $sql_query="delete from messages_system where mes_id='$inv_id'"; sql_execute($sql_query,''); $sql_query="insert into messages_system (mem_id,frm_id,subject,body,type,new,folder,date) values ('$frm->frm_id','$m_id','$subject','$answer','message','new','inbox','$now')"; sql_execute($sql_query,''); [/code] and here is my poor attempt to modify it. [code] $sql_query="insert into network (mem_id,frd_id) values ($m_id,$frm->frm_id),($frm->frm_id,$m_id)"; sql_execute($sql_query,''); $sql_query="delete from messages_system where mes_id='$inv_id'"; sql_execute($sql_query,''); $now=time(); $hic=$now + 200; $sql_query="select * from messages_system where mes_id='$inv_id' order by date limit 0,1"; $hiccup=sql_execute($sql_query,'get'); //250 if ($hiccup <= $hic) exit; [/code] Any suggestions or help in what I did wrong please? Thanks in advance, Jezreel