I have a HTML form that submits to PHP. There is an onChange event on a drop down box that calls a JavaScript function which writes a hidden variable into the form. This additional hidden variable doesnt show up in PHP though, why is this?
So;
<script language="JavaScript">
function change() {
document.getElementById("myDiv").innerHTML="<input type=\"hidden\" name=\"blah\" value=\"1\"/>";
return;
}
</script>
<form method="post" action="test.php" />
<select name="cid" id="cid" onChange="change();">
<option value="lala">lala</option>
</select>
<div id="myDiv"></div>
</form>
PHP doesn't see $_POST['blah']?