You are here: Re: HOW DO YOU STOP THIS... « PHP Language « IT news, forums, messages
Re: HOW DO YOU STOP THIS...

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация