1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Pls I really Need Your Help With This One (THANKS)

Discussion in 'PHP' started by Nusaint, Mar 29, 2011.

  1. #1
    Good day guys. I have this code on my submit page and form. I would like to limit the characters that can be entered in the text area of the description field. Can someone help me please?
    Thanks

     
    Nusaint, Mar 29, 2011 IP
  2. theofficialSJ

    theofficialSJ Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    u need to add a function for this to check the length value. Ping me for details
     
    theofficialSJ, Mar 29, 2011 IP
  3. WoRLDLiFE

    WoRLDLiFE Peon

    Messages:
    116
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    you want to restrict the character limit by javascript or php ?
     
    WoRLDLiFE, Mar 29, 2011 IP
  4. Nusaint

    Nusaint Active Member

    Messages:
    548
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    85
    Digital Goods:
    1
    #4
    Thanks for replies
    @ Worldlife I am not sure the best way to go about achieving this. The code above displays the submit.tpl and I see there is no value for description to be limited. So any ways to go about restricting that value would be appreciated.
    Thanks again
     
    Nusaint, Mar 29, 2011 IP
  5. WoRLDLiFE

    WoRLDLiFE Peon

    Messages:
    116
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    If your not more concern about usability then go for php method of limiting the characters. I would suggest you to add a note on the top of textarea stating character limit and and the time of submission use substr function and get those limited characters.
     
    WoRLDLiFE, Mar 29, 2011 IP
  6. Nusaint

    Nusaint Active Member

    Messages:
    548
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    85
    Digital Goods:
    1
    #6
    Fantastic! Please where in the code would i put this, and what code would i put there :)
    Thanks
     
    Nusaint, Mar 29, 2011 IP
  7. WoRLDLiFE

    WoRLDLiFE Peon

    Messages:
    116
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I can't see the code which submits the user entered data in to database. ??
     
    WoRLDLiFE, Mar 29, 2011 IP
  8. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,046
    Likes Received:
    41
    Best Answers:
    10
    Trophy Points:
    195
    #8
    MyVodaFone, Mar 29, 2011 IP