How to POST empty <select .. multiple> HTML elements if empty?

后端 未结 8 1852
醉酒成梦
醉酒成梦 2021-02-18 18:09

I have the following multi-select box in a HTML form, where user can select one or more option.

just add the following line in the php section that handles the storing of your form:

if (!isset($_POST['related'])) $_POST['related']="";

提交回复
热议问题