如何在setTimeout函数内执行sql查询

I need to execute a sql query once I clicked on a button. I tried it using post() in button click but it refreshes the page and my slideToggle() is not working,so I don't get what I expected.I just only need to change a column status in database using this. Below code shows an alert from the setTimeOut function and also my slideToggle() is working but, it is not executing my query. Please help me to change this function.

  <input id="button_close" type="submit" name="submit_NewCat" value="THANK YOU !" onclick="setTimeout(myFunction, 3000);$('#birthdaycard1').slideToggle(2000);" />

  <script>
      function myFunction() {
          alert('Hello');

          executeSql("update customer_info set card_status = 'Done' where username = '$user' ;");
      }

      $(document).ready(function(){
          $("#birthdaycard1").slideToggle(3000);
      });
  </script>