# ? About the PHP Form Mailer

**URL:** <https://forum.kirupa.com/t/about-the-php-form-mailer/63556>\
**Category:** programming\
**Created:** [September 7, 2004, 11:24pm UTC](https://forum.kirupa.com/t/about-the-php-form-mailer/63556 "2004-09-07T23:24:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ronak](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@Ronak](https://forum.kirupa.com/u/Ronak)\
**Post date:** [September 7, 2004, 11:24pm UTC](https://forum.kirupa.com/t/about-the-php-form-mailer/63556/1 "2004-09-07T23:24:01Z")

</div>

Hi,  
This is my first post. lol. I ned some help. I want a textarea to send a certain amount of characters. And if the person using my contact form excedes the amount of characters specified (lets say 300) then it will print out an error. How would I do that? My textarea’s name is textarea.

Any help would be greatly appreciated. Thanks in advance! 😛

[color=red]~Ron[/color]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 8, 2004, 2:30am UTC](https://forum.kirupa.com/t/about-the-php-form-mailer/63556/2 "2004-09-08T02:30:52Z")

</div>

```php

if(strlen($_POST['textarea']) > 300) {
echo "Error: please limit your content to 300 characters or less";
exit;
}

```

Although, I may be tempted to do this in Javascript, first, to save the load on the server…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 14, 2004, 4:39pm UTC](https://forum.kirupa.com/t/about-the-php-form-mailer/63556/3 "2004-09-14T16:39:09Z")

</div>

Thanks JustJeff!

It worked beautifully

~Ron
