Using if(isset($_POST['submit'])) to not display echo when script is open is not working

后端 未结 7 601
走了就别回头了
走了就别回头了 2020-11-28 14:50

I have a little problem with my if(isset($_POST[\'submit\'])) code. What I want is some echos and a table to not appear when the script is open but I do want it

7条回答
  •  心在旅途
    2020-11-28 15:16

    What you're checking

    if(isset($_POST['submit']))
    

    but there's no variable name called "submit". well i want you to understand why it doesn't works. lets imagine if you give your submit button name delete and check if(isset($_POST['delete'])) then it works in this code you didn't give any name to submit button and checking its exist or not with isset(); function so php didn't find any variable like "submit" so its not working now try this :

    
    

提交回复
热议问题