if (!empty($_POST)) not working

前端 未结 6 1884
悲哀的现实
悲哀的现实 2020-12-18 09:28

I have a php form (code to follow) with a submit button that runs JSON-events.php as its action (method = POST). In the JSON-events co

6条回答
  •  悲&欢浪女
    2020-12-18 10:04

    Using empty() will fail if value 0 is posted So it is better to use
    isset($_POST['FIELD_NAME'])

提交回复
热议问题