Re: [PHP] validating textarea using php

2008-05-14 Thread Richard Heyes
A lot of people think that Can't fault them. until their host upgrades php. Any host that upgrades the PHP version (a major upgrade considering it would be 5 - 6) without notifying Customers isn't a very good hosting company, and you really should change to a better one (Rackspace are

Re: [PHP] validating textarea using php

2008-05-14 Thread Dotan Cohen
2008/5/14 Chris W [EMAIL PROTECTED]: A lot of people think that, until their host upgrades php. Have you seen how many things are being removed for php6? From the article I read, that isn't one of them. That issue specifically, no. However, portable code is desirable even if your code is

Re: [PHP] validating textarea using php

2008-05-14 Thread Dotan Cohen
2008/5/14 Richard Heyes [EMAIL PROTECTED]: Any host that upgrades the PHP version (a major upgrade considering it would be 5 - 6) without notifying Customers isn't a very good hosting company, and you really should change to a better one (Rackspace are good). Even 1and1 don't do that and

Re: [PHP] validating textarea using php

2008-05-14 Thread Richard Heyes
Dotan Cohen wrote: 2008/5/14 Richard Heyes [EMAIL PROTECTED]: Any host that upgrades the PHP version (a major upgrade considering it would be 5 - 6) without notifying Customers isn't a very good hosting company, and you really should change to a better one (Rackspace are good). Even 1and1

Re: [PHP] validating textarea using php

2008-05-14 Thread Dotan Cohen
2008/5/14 Richard Heyes [EMAIL PROTECTED]: That really should be expected. You can't expect something to last forever without tweaking it on occassion. And in the case of going from PHP 5 - 6, the tweaking required may well be major, becxcause it's a major version change. Exactly. That's why

[PHP] validating textarea using php

2008-05-13 Thread Sudhakar
hi i need to validate textarea of a html form using php textarea name=comments cols=26 rows=3 id=comments?php echo($comments);?/textarea presently my php code to validate the text area is if($comments == ) { $error.=brPlease enter your comments; } with this code if a user hits the space bar

Re: [PHP] validating textarea using php

2008-05-13 Thread Thijs Lensselink
Quoting Sudhakar [EMAIL PROTECTED]: hi i need to validate textarea of a html form using php textarea name=comments cols=26 rows=3 id=comments?php echo($comments);?/textarea presently my php code to validate the text area is if($comments == ) { $error.=brPlease enter your comments; } with

RE: [PHP] validating textarea using php

2008-05-13 Thread Warren Vail
with this code if a user hits the space bar once or couple of times as a matter of fact there are no characters entered by the user i do not want this to happen, if a user simply hits the spacebar and does not type anything i should be able to display an alert message. One

RES: [PHP] validating textarea using php

2008-05-13 Thread Thiago Pojda
: terça-feira, 13 de maio de 2008 11:45 Para: Sudhakar Cc: php-general@lists.php.net Assunto: Re: [PHP] validating textarea using php i need to validate textarea of a html form using php textarea name=comments cols=26 rows=3 id=comments?php echo($comments);?/textarea You really should use

Re: [PHP] validating textarea using php

2008-05-13 Thread Richard Heyes
i need to validate textarea of a html form using php textarea name=comments cols=26 rows=3 id=comments?php echo($comments);?/textarea You really should use htmlspecialchars before showing any user stipulated HTML to help prevent security holes. Also you can use short tags (popular...) to

Re: [PHP] validating textarea using php

2008-05-13 Thread Hiep Nguyen
On Tue, 13 May 2008, Sudhakar wrote: hi i need to validate textarea of a html form using php textarea name=comments cols=26 rows=3 id=comments?php echo($comments);?/textarea presently my php code to validate the text area is if($comments == ) { $error.=brPlease enter your comments; } with

Re: [PHP] validating textarea using php

2008-05-13 Thread Usamah al-Amin
if(chop($comments) == ) { ... } //hope that helps. Well, chop() is an alias of rtrim(), so it won't work here for, say, trimming control characters at the end of the string like line feeds. trim() is actually the best bit here. Regards, Usamah -- PHP General Mailing List

Re: [PHP] validating textarea using php

2008-05-13 Thread Dan Joseph
On Tue, May 13, 2008 at 12:02 PM, Usamah al-Amin [EMAIL PROTECTED] wrote: if(chop($comments) == ) { ... } //hope that helps. Well, chop() is an alias of rtrim(), so it won't work here for, say, trimming control characters at the end of the string like line feeds. trim() is actually the

Re: [PHP] validating textarea using php

2008-05-13 Thread Jim Lucas
Richard Heyes wrote: Also you can use short tags (popular...) to make the HTML more readable. Eg: textarea name=comments cols=26 rows=3 id=comments ?=htmlspecialchars($comments)? /textarea It also makes the code less portable. -- Jim Lucas Some men are born to greatness, some

Re: [PHP] validating textarea using php

2008-05-13 Thread Robert Cummings
On Tue, 2008-05-13 at 19:02 +0300, Usamah al-Amin wrote: if(chop($comments) == ) { ... } //hope that helps. Well, chop() is an alias of rtrim(), so it won't work here for, say, trimming control characters at the end of the string like line feeds. trim() is actually the best bit here.

Re: [PHP] validating textarea using php

2008-05-13 Thread Iv Ray
Sudhakar wrote: i do not want this to happen, if a user simply hits the spacebar and does not type anything i should be able to display an alert message. From usability point of view such check will, in many cases, generate annoyance, and bring nothing. If I do not want to enter anything,

Re: [PHP] validating textarea using php

2008-05-13 Thread Shawn McKenzie
Dan Joseph wrote: On Tue, May 13, 2008 at 12:02 PM, Usamah al-Amin [EMAIL PROTECTED] wrote: if(chop($comments) == ) { ... } //hope that helps. Well, chop() is an alias of rtrim(), so it won't work here for, say, trimming control characters at the end of the string like line feeds. trim()

Re: [PHP] validating textarea using php

2008-05-13 Thread Richard Heyes
Jim Lucas wrote: Richard Heyes wrote: Also you can use short tags (popular...) to make the HTML more readable. Eg: textarea name=comments cols=26 rows=3 id=comments ?=htmlspecialchars($comments)? /textarea It also makes the code less portable. If that's even a concern. A lot of the

Re: [PHP] validating textarea using php

2008-05-13 Thread Dotan Cohen
2008/5/14 Richard Heyes [EMAIL PROTECTED]: It also makes the code less portable. If that's even a concern. A lot of the time, it's not. A lot of people think that, until their host upgrades php. Have you seen how many things are being removed for php6? Dotan Cohen http://what-is-what.com

Re: [PHP] validating textarea using php

2008-05-13 Thread Robert Cummings
On Wed, 2008-05-14 at 00:32 +0300, Dotan Cohen wrote: 2008/5/14 Richard Heyes [EMAIL PROTECTED]: It also makes the code less portable. If that's even a concern. A lot of the time, it's not. A lot of people think that, until their host upgrades php. Have you seen how many things are

Re: [PHP] validating textarea using php

2008-05-13 Thread Chris W
Dotan Cohen wrote: 2008/5/14 Richard Heyes [EMAIL PROTECTED]: It also makes the code less portable. If that's even a concern. A lot of the time, it's not. A lot of people think that, until their host upgrades php. Have you seen how many things are being removed for php6? From the article