# Speech Dictation doesn't work on new posts

**URL:** <https://community.open-emr.org/t/speech-dictation-doesnt-work-on-new-posts/6083>\
**Category:** OpenEMR Development\
**Created:** [August 11, 2009, 8:34pm UTC](https://community.open-emr.org/t/speech-dictation-doesnt-work-on-new-posts/6083 "2009-08-11T20:34:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [August 11, 2009, 8:34pm UTC](https://community.open-emr.org/t/speech-dictation-doesnt-work-on-new-posts/6083/1 "2009-08-11T20:34:26Z")

</div>

**[jwallace00](https://sourceforge.net/u/jwallace00/)** wrote on [Tuesday, August 11, 2009](https://sourceforge.net/p/openemr/discussion/202506/thread/7266dd7e/#4c54):

Hello,&nbsp;

&nbsp; I am working with Dr. Bowen and this issue was brought to my attention earlier today.&nbsp;&nbsp; After some troubleshooting,&nbsp; I observed behavior where new speech dictation entries were blank,&nbsp; but new Additional Notes entries would complete successfully.&nbsp;&nbsp; Additionally,&nbsp; an update for each entry would work without issue.&nbsp;&nbsp;  
&nbsp; I eventaully traced the problem to $\_POST getting passed from interface/forms/dictation/save.php&nbsp; to formSubmit.php in library/api.inc.&nbsp;&nbsp;&nbsp; The problematic line 35 in api.inc.&nbsp;&nbsp;&nbsp; The while loop was only processing the additional notes key/value pair for reasons partially unknown.&nbsp;&nbsp; I added 2 debug sections to save.php to dump the values of $\_POST before the formSubmit function call.&nbsp;&nbsp; The first section was using the while method in question while the second section used foreach($\_POST as $key=\>$value).&nbsp;&nbsp;&nbsp;&nbsp; The foreach loop output both the dictation and additional notes section.&nbsp;&nbsp;

In api.inc, I changed the while loop to use the foreach method and this problem is resolved.&nbsp;&nbsp;

We are running OpenEMR 3.0.1 CVS on PHP Version 5.2.10-pl0-gentoo with apache-2.2.11-r2 and mysql 5.0.70.&nbsp;&nbsp; The only think I can think is that our version of php handles superglobals in an odd way with the each() function.&nbsp;&nbsp; It’s most likely a bug with php,&nbsp; but this should be an equivalent work around.&nbsp;&nbsp;
