settimeout php sql : <p>I am using php,sql,javascript I am building a friend request system  , if user-1 sends user-2 a friend request user-2 has 1 hour to accept that friend request or the friend request is automatically denied/removed . . . i can use settimeout to run that function but if the page is refreshed that function is no longer good , I need it to be able to run even if both users are not online anymore . . . so if  user-1 and user-2 are both online at the time when the friend request is sent. . . user-2  and user-1 signs out , i need that friend request to be deleted within 1 hr of the time sent , i am pretty certain that function would need to be ran on the server or something just not sure what direction I would need to look it ! just confused maybe theres a function in php i can use? </p>
