buy2.php 422 B

123456789101112131415161718192021
  1. <?php
  2. $host = "blueris.beget.tech";
  3. $username = "blueris_base";
  4. $password = "Qwer123.";
  5. $database = "blueris_base";
  6. $mysql = new mysqli($host, $username, $password, $database);
  7. $id = $_COOKIE['id'];
  8. $query = "INSERT INTO buy_service (`id_user`,`id_service`) VALUES ('$id', '2')";
  9. $result = $mysql->query($query);
  10. if(!$result)
  11. {
  12. }
  13. else{
  14. echo "<script>window.location.href = 'Account.php';</script>";
  15. }
  16. ?>