Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("dbcon.php");
- $id = 0;
- $count = 0;
- if( isset($_POST['id']) )
- $id = (int)$_POST['id'];
- if( $id ) {
- $sql = "delete from posts where id={$id}";
- if( $rs = $db->query($sql) ) {
- $count = $rs->rowCount();
- }
- }
- echo $count;
Add Comment
Please, Sign In to add comment