Guest User

Untitled

a guest
Aug 9th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. <?PHP
  2. /*
  3. * Simple PHP MySQL Counter
  4. *
  5. * Written by Goat
  6. *
  7. * Include this file at the top of your application
  8. *
  9. */
  10.  
  11. $server = '';
  12. $username = '';
  13. $password = '';
  14.  
  15. $tablename = '';
  16.  
  17. $connection = mysql_connect("$server","$username","$password");
  18.  
  19. if (!$connection)
  20. {
  21. die('Could not connect: ' . mysql_error());
  22. }
  23.  
  24. UPDATE $tablename SET count = count+1 WHERE id = $id;
  25.  
  26. mysql_close($connection);
Add Comment
Please, Sign In to add comment