Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Senior Member zionlocke's Avatar
    Join Date
    Jan 2003
    Location
    .: l33t Basement :.
    Posts
    736
    Member #
    483
    Liked
    3 times
    I have a form mailer I'm working on. The place where the message goes is using the textarea tag. So, I want to limit the characters of that variable to two thousand. I have what is below for what is displayed if nothing is written there... I want to know how to stop the possible overflow of characters

    if($comments == "") {
    echo("$front You forgot to write the letter! $end");
    exit;
    }
    Cheers, zionlocke :chinese:
    Links: Zion Creation | Blog

  2.  

  3. #2
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    I don't understand...you want to limit the number of characters the user types, the number of characters echoed...?
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  4. #3
    Senior Member nsr81's Avatar
    Join Date
    Oct 2002
    Posts
    1,132
    Member #
    250
    Liked
    15 times
    PHP Code:
    if(strlen($comments) > 2000) {
    echo(
    "$front too much rambling. $end");
    exit;

    There and Back Again :Ogre:

  5. #4
    Senior Member zionlocke's Avatar
    Join Date
    Jan 2003
    Location
    .: l33t Basement :.
    Posts
    736
    Member #
    483
    Liked
    3 times
    sweet! I need to pick up some good php books. don't respond with a list. I've already looked... laterz

    edit: filburt, the file I was editing was a separate php file from the html file used for the comments page of my site. now mostly complete with char limits and that limit on the textarea now

    edit2: i testedit out and it works... mucho thanks
    Cheers, zionlocke :chinese:
    Links: Zion Creation | Blog


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:54 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com