Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - Getting my Username to go past 15 charter
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Getting my Username to go past 15 charter

 Post Reply Post Reply Page  12>
Author
gregcaulder View Drop Down
Newbie
Newbie


Joined: 20 March 2005
Location: United States
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote gregcaulder Quote  Post ReplyReply Direct Link To This Post Topic: Getting my Username to go past 15 charter
    Posted: 23 March 2005 at 10:37pm
Ok i have a problem with Usernames going past 15 charcters. I have edited the Register.asp page and the add_member.asp page in the admin section to go up to 25 charcters.

<input type="text" name="name1" size="25" maxlength="25" value="" />

The problem is that after i subbmit it wit han example beyond 15 charcters; anyhting between 15-25.

Wehn i click on my Members list it shows teh account to only display 15 charcters Maxium. Which is very disapointing. The database allows charter length longer then 15 char's so i have no problem there.


What do i need to change to make it display the Full Username.

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 24 March 2005 at 5:29am
When the form entry is read in in the regsiter.asp file a 'Trim' is run on the entry to reduce it down to 15 characters.
Back to Top
gregcaulder View Drop Down
Newbie
Newbie


Joined: 20 March 2005
Location: United States
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote gregcaulder Quote  Post ReplyReply Direct Link To This Post Posted: 24 March 2005 at 11:41am
Is there anyway to get around it or to change it from only reading 15 charters?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 24 March 2005 at 12:02pm
Yes change the amount the input is Trimmed by that I metioned in my last post.
Back to Top
gregcaulder View Drop Down
Newbie
Newbie


Joined: 20 March 2005
Location: United States
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote gregcaulder Quote  Post ReplyReply Direct Link To This Post Posted: 24 March 2005 at 1:00pm
I see. So it trims the length to 15 charcters. So if someone were to register with something longer the n15 charcters it would be trimmed no matter what down to 15 charters before entering the database.

How would i go about editing this trimming factor. I lookd in the common.asp file and found nothing. Which files will i need to edit, and if possibley what lines of code are they located in?


Greg
Back to Top
gregcaulder View Drop Down
Newbie
Newbie


Joined: 20 March 2005
Location: United States
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote gregcaulder Quote  Post ReplyReply Direct Link To This Post Posted: 24 March 2005 at 1:02pm
Nevermind i found the Trim string.

Thanks for the help.

Greg
Back to Top
TheLee View Drop Down
Newbie
Newbie


Joined: 15 January 2005
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote TheLee Quote  Post ReplyReply Direct Link To This Post Posted: 20 May 2005 at 11:20pm
Make sure you remember to change the maxlength and trim in all the other pages that it exists in as well, such as the private messanger pages and the pop up search for username page,etc 
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 21 May 2005 at 3:51pm
Don't forget to change the size of the field in the database as well.
The db field size is longer than 15 characters because the update routine replaces characters that could be used for sql injection attacks (e.g. ', [, ", etc.) with their decimal equivalents. You need to have extra space in the db field to hold those replacement characters.

Lead me not into temptation... I know the short cut, follow me.
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.