I am having some code where I cannot find out where the values for 'add_bereich' are coming from. In the form its declared as empty value. But when saved in the database it has an integer.
I have a form and when submitted its values get saved in the database
<div class='dialog_form' id='bereich-form' title='Neuer Bereich'>
<form action='/mbm-kalkulation/?id=".$_GET["id"]."' method='post' id='bereich_form'>
<input type='hidden' name='add_bereich' id='add_bereich' value=''>
<fieldset>
<label for='name'>Name</label>
<input type='text' name='bereich_name' id='bereich_name' value='' class='text ui-widget-content ui-corner-all'>
<input type='submit' tabindex='-1' style='position:absolute; top:-1000px'>
</fieldset>
</form>
</div>
Then when submitted the following values get saved into the database
if(isset($_REQUEST["add_bereich"])){
$wpdb->insert("mbmerp_angebote_bereich", array(
'aid' => $_GET["id"],
'rid' => $_REQUEST["add_bereich"],
'name' => $_REQUEST["bereich_name"]
));
}
After that I might find a record for 'add_bereich' in the database with an interger e.g. 3.
Where is that coming from?