Re: [PHP] input validation?

2006-01-13 Thread PHP Superman
I think the attribute is called maxlength but i'm not sure, oh well add the maxlength attribute to your input tag to have a quick, clean non-javascript-realiant solution On 1/12/06, John Meyer <[EMAIL PROTECTED]> wrote: > > Stut wrote: > > Ok, you're clearly missing my point and while I don't wa

Re: [PHP] input validation?

2006-01-12 Thread John Meyer
Stut wrote: Ok, you're clearly missing my point and while I don't want this to degrade into the usual pissing contest I do feel I need to clarify what I was saying. I completely agree that in this case Javascript should be used to provide the user with feedback as to how close to the limit th

Re: [PHP] input validation?

2006-01-12 Thread Stut
[EMAIL PROTECTED] wrote: I disagree... PHP frequently involves interacting with or outright using alternative technologies to accomplish your goal. This includes HTML, XML, databases, etc. To effectively use PHP you need to understand your options and the pros/cons in using the other techn

Re: [PHP] input validation?

2006-01-12 Thread Stut
[EMAIL PROTECTED] wrote: Hmm.. I didn't see anyone ask "before or after the user clicks SUBMIT"? Probably because this is a PHP list and nothing that happens on the client side is a) controllable by PHP or b) guaranteed. Whatever you do on the client side you should always validate anythi

Re: [PHP] input validation?

2006-01-12 Thread tg-php
Hmm.. I didn't see anyone ask "before or after the user clicks SUBMIT"? If it's before, then you should use javascript to check the form element prior to submitting (you can check realtime with the onkeydown, onkeyup events... check after a user moves off of the form element with onchange or ev

Re: [PHP] input validation?

2006-01-12 Thread Austin Denyer
On Thu, 12 Jan 2006 16:56:43 +0200 "William Stokes" <[EMAIL PROTECTED]> wrote: > > Hello, > > I need to check that user input text is less than 300 characters > long. How? if(strlen($UserInputText) > 300){ echo("Too long"); } See http://www.php.net/manual/en/print/function.strlen.php R

Re: [PHP] input validation?

2006-01-12 Thread Larry E. Ullman
I need to check that user input text is less than 300 characters long. How? if (strlen($_POST['input']) < 300) { ... You may want to also apply trim() to the input text to get rid of extraneous white space at the beginning and end of the input. Larry -- PHP General Mailing List (http://ww

Re: [PHP] input validation?

2006-01-12 Thread Silvio Porcellana
William Stokes wrote: > Hello, > > I need to check that user input text is less than 300 characters long. How? > > Thanks > -Will > Try with strlen: http://php.net/strlen Silvio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] input validation?

2006-01-12 Thread Jay Blanchard
[snip] I need to check that user input text is less than 300 characters long. How? [/snip] string length, it's in the manual. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Input Validation of $_SESSION values

2003-11-05 Thread Chris Shiflett
--- Pablo Gosse <[EMAIL PROTECTED]> wrote: > It's obviously best practice to rigorously check and validate all input > coming via $_GET or $_POST, but what about $_SESSION values? Session data can be considered safe, but there are of course caveats. It is not possible for the user to manipulate se