Bug fix, incorrectly named variable

The foreach specifies the variable $word for each posted word, but $value is used is used in the dictionary check. Fixed.