如何从$ _POST数组中删除元素?

phe*_*mix 2 html php xhtml post

我想从公式中将记录插入MySQL数据库表.问题是变量field中的表中的列不存在,$_POST但它显示为a textfield中的a formulaire.我通过这种方式插入字段值:

$newRecord->insert($_POST); // we created a generic function insert($array) to insert records
Run Code Online (Sandbox Code Playgroud)

那么如何删除$ _POST的元素呢?

Jak*_*kub 16

简单地说:

unset($_POST['field']);
Run Code Online (Sandbox Code Playgroud)