How to count the string length of a form variable using PHP?
Posted on 2012-04-04
I have a simple form field <input type="text" name="test"> that submits a text string. The string is a 7 character combination of letters and numbers. Using count() and strlen() contiuously produces '0' as a result. What am I doing wrong?
Code at the top of my form processor:
$show_test_length = strlen ($test );
//I KNOW TEST IS BEING PASSED PROPERLY BECAUSE THE FOLLOWING PRINTS THE VARIABLE BEING PASSED BY THE FORM