// function to get all categories from the db
function find_all_category(){
global $connection;
$query = "SELECT * FROM `category`"; //getting data from db
$get_cat_details = mysqli_query($connection, $query);
while($row=mysqli_fetch_assoc($get_cat_details)) { // fetch-array
$cat_id=$row['catid'];
$cat_name=$row['catname'];
echo "<tr>";
echo "<td>{$cat_id}</td>";
echo "<td>{$cat_name}</td>";
echo "<td><a href='category.php?edit={$cat_id}'><i class='fa fa-pencil-
square-o' aria-hidden='true' style='color:purple;'></i></a>
</td>";
echo "<td><a class='item_delete' href='category.php?delete={$cat_id}'><i
class='fa fa-trash-o' aria-hidden='true' style='color:red;'></i>
</a></td>"; // contains class to be used in javascript
echo "</tr>";
}
}
//javascript function for the confirm function
$(".item_delete").click(function()
return confirm("Are you sure you want to delete ?");
)};
Not working,please help