Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default form character limit

    My personal site got stuck in the world of spam bots. I need a way to limit my shoutbox to a certain number of characters.. The shoutbox is flatfile. I can post the code if it's needed,
    Last edited by Colin-Roberts; 02-02-2009 at 10:01 PM.

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


  2. #2

    Default

    Well you'd want to set the maxlength attribute on your textarea and then you can if you want include javascript to display to the writer how many characters are left. Then an extra pre-caution could be to use strlen and check if it's the right length.

  3. #3
    Join Date
    Aug 2008
    Location
    Australia!
    Posts
    33
    Tokens
    0

    Default

    <textarea maxlength="50">

    Limits the textbox to 50 characters - Also works on input fields.

  4. #4
    Join Date
    Aug 2005
    Location
    London
    Posts
    9,773
    Tokens
    146

    Latest Awards:

    Default

    Quote Originally Posted by Ryzie View Post
    <textarea maxlength="50">

    Limits the textbox to 50 characters - Also works on input fields.
    can be modified vis javascript to make it longer, most secure way is to use the strlen php function as izsak stated .

  5. #5
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    PHP Code:
    substr$variable050 ); 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •