Show an image if the character count of a data field is equal to a specific number of characters
<p>I have a field in which all data needs to be 13 characters in length.  I would like to show a check mark image if the file name that was placed in the database is the correct number of characters (13) or show an exclamation mark image if the file name is not equal to 13 characters in length.  This is what I have so far, but obviously it's not working.</p>

<pre><code>&lt;?php
$val1 = 13;
if (count_chars($image_id) == ($val1)) {
echo '&lt;img src="images/icons/check.gif" /&gt;';
}
else {
echo '&lt;img src="images/icons/exclamation.gif" /&gt;';
}
?&gt;
</code></pre>
