When to use firstname or username or both

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>

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

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

Thanks in advance, Scott