That error is usually associated with sending headers after output has been sent to the browser.
Headers must be sent before such output, meaning that they should be placed way before the document declaration, this often includes other code. But as a rule of thumb, before any output is sent. Setcookie is likely the source of the problem in this case, since its send with the rest of the headers, before any other output. Make sure that you ain't accidentally outputting something. Even something as simple as a space or newline character can be enough to break things, and those are normally invisible to the eye, unless you mark them with your cursor or enable editor specific features to show them.
Note line 14 dose give a good indication as of what may be the exact source, in this case likely setcookie. Always remember to look up the mentioned line.
You also appear to be missing the brackets for the if($row['CODE']) if statement, try to count the number of rows returned. I.e. http://php.net/manual/en/function.mysql-num-rows.php, that may be a better way to check if anything was returned from the DB.
Finally your query could be considered unsafe, the rule of thumb about always quoting array names also holds true when used in queries. I know it doesn't seam obvious, but quotes can be retained by enclosing the array variable in brackets. I.e.
-----StartCode-----
mysql_query("SELECT * FROM COUPONS WHERE CODE='{$_POST['coup']}'");
-----CodeEnd-----
There is no need to use String Concatenation, like another poster suggested. Variables are automatically phrased by PHP when using double quotes.
See also:
http://php.net/manual/en/function.setcookie.php - PHP: setcookie - Manual