Skip to content

Instantly share code, notes, and snippets.

@ambiorixg12
Created October 28, 2021 01:38
Show Gist options
  • Select an option

  • Save ambiorixg12/6c63483c60d34e81d741ef65ee1b3fbb to your computer and use it in GitHub Desktop.

Select an option

Save ambiorixg12/6c63483c60d34e81d741ef65ee1b3fbb to your computer and use it in GitHub Desktop.
<?php
$link = mysqli_connect("localhost", "root", "", "dialer");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
$query = " delete from dnc where phone='$_GET[name]'";
if ($result = mysqli_query($link, $query)) {
header("Location:./dnc.php");
/* free result set */
mysqli_free_result($result);
}
else {
printf("Error: %s\n", mysqli_error($link));
}
/* close connection */
mysqli_close($link);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment