homepage Welcome to WebmasterWorld Guest from 107.20.34.144
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
When to use firstname or username or both
Scotty13



 
Msg#: 4436124 posted 10:02 am on Apr 2, 2012 (gmt 0)

I’m a newbie, be gentle on me. Im following a tutorial series online and Im building a social network website.
I want my member to sign up with their first name, last name, etc…

Q. I’m confused when it comes time to use the firstname in my scripts and when to use username. I have firstname and username in myTable.

Example below…

<td align="right" class="alignRt"><div align="right">First Name:<span class="brightRed"> <span class="answerquestion">*</span></span>

</div></td>
<td align="left" class="alignleft"><input name="username" type="text" class="formFields" id="username" value="<?php print "$username"; ?>" size="32" maxlength="36" /></td>

Like algebra, its simple when you get it, I can not get it when it comes to this.

Thanks in advance, Scott

 

eelixduppy

WebmasterWorld Senior Member eelixduppy us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 4436124 posted 2:31 pm on Apr 2, 2012 (gmt 0)

I'm not sure I understand your question. Can you please elaborate?

Additionally, I tend to think of username as a unique identifier whereas the first name is not unique. Many just get rid of the username entirely and use the users email address instead. I guess this would depend, though, if your users want an alias or not.

rocknbil

WebmasterWorld Senior Member rocknbil us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4436124 posted 4:15 pm on Apr 2, 2012 (gmt 0)

Look at your account on this site. **IF** there were a field for your first and last name, you'd still want to use your username, right?

Usernames are for public displays and login/session "handles." That is, you use the user name and password to login, but once logged in, you translate that to the numeric record ID to maintain a login. That way, you're not doing a textual lookup every time you validate that user (slower than numeric lookup, and a little more secure - the numeric value is never displayed.)

First names and last names are useful for validation such as password recovery or other multi-factor validations to make it a little more secure (that is, on password recovery, the process might require email, username, first, last, mother's maiden, secret question response, whatever.) Otherwise it's an optional display item, except in Facebook which requires a "real" name (tongue in cheek.)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved