Re: size of submitted textarea field in bytes

From: Date: Thu, 14 Aug 2003 11:33:33 +0000
Subject: Re: size of submitted textarea field in bytes
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-159552@lists.php.net to get a copy of this message
You receive a string, so you need to find a function that will return the size of a string. I bet you will find the function in string section of the manual. Sn!per wrote:
i have a textarea where ppl will enter their bio. after they submit the form, i need to compute the size of their bio in bytes _without_ creating any file. is this at all possible ? please advise. sample script: <? if ($_POST['submit']) {
    print "you have submitted xyz bytes";
} else { ?> <form method=post action="./p.php"> <textarea name="html_code" cols="70" rows="10"></textarea> <input type=submit name=submit value=submit> </form> <? } ?> rgds. --------------------------------------------------- Sign Up for free Email at http://ureg.home.net.my/ ---------------------------------------------------


« previous php.general (#159552) next »