Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
- <script type="text/javascript">
- function onClick(arg){
- alert("Dziękujemy za Twój głos!");
- $.ajax({
- type: 'POST',
- contentType: text,
- url: 'data.php',
- data: {
- 'arg': arg,
- },
- success: function(response) {
- content.log(response);
- }
- });
- }
- </script>
- <?php
- $servername = "xx";
- $username = "xx";
- $password = "xx";
- $name ="xx";
- $conn = new mysqli($servername, $username, $password, $name);
- $id = $_POST;
- $sql = "UPDATE Buttons SET SUMA = SUMA + 1 WHERE ID = '$id'";
- $conn->query($sql);
- $conn->close();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement