Isset expression error

前端 未结 3 1839
滥情空心
滥情空心 2020-12-18 19:34

I have basically coded a code which populates a list of categories from my database then you are able to select which to delete.

I have the issue with the delete cod

相关标签:
3条回答
  • 2020-12-18 20:26

    You missed this ):

    if(isset($_POST['delete_id']) && !empty($_POST['delete_id']))
                                ^---
    
    0 讨论(0)
  • 2020-12-18 20:28

    Others have shown the issue of the missing ) in the expression, but empty() will check isset() so that is redundant. Just check empty():

    if(!empty($_POST['delete_id'])) {
    
    0 讨论(0)
  • 2020-12-18 20:29

    The issue is that this

    if(isset($_POST['delete_id'] && !empty($_POST['delete_id'])))
    

    should be

    if(isset($_POST['delete_id']) && !empty($_POST['delete_id']))
    
    0 讨论(0)
提交回复
热议问题