Why can't it be deleted? ? ?
海洋之心
海洋之心 2017-06-12 17:38:59
0
1
970

In index.php:

<script>

function doDel(id){

if(confirm("Confirm deletion?")){

window.location="action.php?action=del&id" id;

}

}

</script>

and

<a href='javascript:void(0);' onclick='doDel({$row['id']})'>Delete</a>

In action.php:

case 'del':

$id = $_GET['id'];

$sql = "delete from stu where id='$id'";

                                                                                                            $rw = mysqli_query($conn,$sql); ;script>alert('Deletion successful');</script>";

             }else{

                                                                                                                             with with script>";

                                                                                                                                                                                                                                                                                script >

海洋之心
海洋之心

reply all(1)
shuffle

1497275534(1).jpg

Isn’t the id passed over? &id="+id

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template