|
Posted by Tyrone Slothrop on 09/09/05 05:42
On 8 Sep 2005 16:05:27 -0700, matt.sus@gmail.com wrote:
>Hi
>
>I have a form which sends variables to a php page that then does its
>stuff.
>
>
>what I need to do is limit the chharacters of a variable that goes
>through the php form.
>
>I have already set this to 12 characters max on the form. But I realise
>that although it is unlikely, somebody sending variables directly to
>http://www.mydomain.com/folder/myphppage.php wouldnt have this
>restriction
>
>
>I wouldn't normally be worried about this at all. But with the
>application that I am working on, I could incur extra charges for more
>characters than the specified 12.
>
>
>I know its a bit strange but does anyone know how I can make the php
>page ONLY listen to my form, or restrict the number of characters of a
>variable in thee php page?
>
>Any help appreciated.
$_POST['field'] = substr ($_POST['field'], 0, 12);
BTW, subjects all in caps is poor netiquette. You will get better
responses if you do not YELL!
Navigation:
[Reply to this message]
|