Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //call the connection file
- require 'connessione.php';
- //errors enabled
- error_reporting(-1);
- ini_set('display_errors', 'On');
- var_dump($_POST);
- $myId = intval($_POST['idRecord']);
- try {
- $dbh = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
- // set the PDO error mode to exception
- $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- $del = $dbh->prepare("DELETE FROM tagesroma WHERE id= '" . $myId . "'");
- $del->execute();
- $count = $del->rowCount();
- echo json_encode($count);
- }
- catch(PDOException $e)
- {
- echo "Connection failed: " . $e->getMessage();
- }
- $dbh = null;
- var_dump($count);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement