Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. if(isset($_GET['address'])){
  2. require("../config.php"); #My database connection
  3.  
  4. $address = $_GET['address']; #Getting users bitcoin address from url
  5.  
  6. $price = mysqli_query("SELECT af_time FROM af_auto WHERE Address = '$address'"); #Trying to get users current timestamp
  7.  
  8. $result = mysqli_fetch($price); #Trying to get users current timestamp
  9.  
  10. $future = strtotime("+1 hour"); #Trying to get timestamp of 1 hour ahead of time
  11.  
  12. $expire = $result['price'] + $future; #Trying to add current timestamp plus 1 hour
  13.  
  14. $q = $con->query("UPDATE af_auto SET af_Time = $expire WHERE Address = '$address'"); #Trying to update database with my new timestamp
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement