I want, php find my value from select box but here don't find.
I have html:
<select name="outputFormat" id="outputFormat">
</select>
And js:
document.getElementById("outputFormat").options.length = 0;
var obj=document.getElementById("outputFormat");
var opt = document.createElement('option');
opt.value = "DOC";
opt.innerHTML = "DOC";
obj.appendChild(opt);
And my php is:
$outputFormat = $_POST['outputFormat'];
switch ($outputFormat) {
case 'DOC':
echo "find"; //here is not
break;
I see here, value is empty. What is wrong and how I fix this? In the end my html look like this:
<select name="outputFormat" id="outputFormat">
<option value="DOC">DOC</option>
</select>