Advertisement
Guest User

Untitled

a guest
May 6th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <?
  2.  
  3. error_reporting(E_ALL);
  4.  
  5. $db_pass='yFYMZ5JGW8S657GQ';
  6. $db_host='localhost';
  7. $db_user='buh';
  8. $db_name='balance';
  9.  
  10. $new_sum = $_GET['sum'];
  11. $new_comm = $_GET['comment'];
  12. $type = $_GET['type'];
  13.  
  14. $current_date = date("c");
  15. $query = "INSERT INTO balance.balance (date,action,sum,comment) VALUES ('$current_date','$type','$new_sum','$new_comm')";
  16. $conn = mysql_connect($db_host, $db_user, $db_pass)
  17. or die("Couldn't connect");
  18. $query_res = mysql_query($query)
  19. or die ("Shit happens - " . mysql_error());
  20.  
  21.  
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement