title: Automatically get logged in user's username in Name field of html form
body: <p>Currently users logged in have to type their name manually to comment or post but i want to 
  get the username in the field name of html form inserted automatically. Also at the same time user cannot change the name field.</p>
  
  <p>how can i create such session in username field, i tried but code isnt working..</p>
  
  <p><a href="http://img685.imageshack.us/img685/5544/55316393.jpg" rel="nofollow"> like this </a></p>
  
  <pre><code>//create the form to submit comments
  //you can add more fields, but make sure you add them to the db table and the page, submitcomment.php
      echo "
  &lt;a name=\"post\"&gt;
  &lt;div id=\"submitcomment\" class=\"submitcomment\"&gt;
  &lt;form name=\"submitcomment\" method=\"post\" action=\"submitcomment.php\" onSubmit=\" return form_Validator(this)\"&gt;
  &lt;table width=\"100%\"&gt;
          &lt;tr&gt;
                  &lt;th colspan=\"2\"&gt;&lt;h4&gt;&lt;span&gt;Leave your comment:&lt;/span&gt;&lt;/h4&gt;&lt;/th&gt;
          &lt;/tr&gt;
  </code></pre>
  
  <blockquote>
    <p></p>
  
  <pre><code>              &lt;th scope=\"row\"&gt;&lt;p class=\"req\"&gt;Name:&lt;/p&gt;&lt;/th&gt;
                &lt;td&gt;&lt;input type= class=\"form\" tabindex=\"1\" id=\"name\" name=\"name\" /&gt;&lt;/td&gt;
        &lt;/tr&gt;
  </code></pre>
  </blockquote>
  
  <pre><code>        &lt;tr&gt;
                  &lt;th scope=\"row\"&gt;&lt;p class=\"opt\"&gt;Email:&lt;/p&gt;&lt;/th&gt;
                  &lt;td&gt;&lt;input class=\"form\" tabindex=\"2\" id=\"email\" name=\"email\" /&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
  
                  &lt;th scope=\"row\"&gt;&lt;p class=\"opt\"&gt;URL:&lt;/p&gt;&lt;/th&gt;
                  &lt;td&gt;&lt;input class=\"form\" tabindex=\"3\" id=\"url\" name=\"url\" /&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr valign=\"top\"&gt;
                  &lt;th scope=\"row\"&gt;&lt;p class=\"req\"&gt;Comments:&lt;/p&gt;&lt;br /&gt;&lt;/th&gt;
                  &lt;td&gt;&lt;textarea class=\"formtext\" tabindex=\"4\" id=\"message\" name=\"message\" rows=\"10\" cols=\"50\"&gt;&lt;/textarea&gt;&lt;/td&gt;
          &lt;/tr&gt;
  
          &lt;tr&gt;    
                  &lt;td&gt;&amp;nbsp;&lt;/td&gt;
                  &lt;td&gt;&lt;input type=\"submit\" name=\"post\" class=\"submit\" value=\"Submit Comment\" /&gt;&lt;br /&gt;
                  &lt;p&gt;Note:  Emails will not be visible or used in any way, and are not required.  Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted. &lt;/p&gt;
                  &lt;p&gt;In Beta Phase&lt;/p&gt;
  
  &lt;/td&gt;
          &lt;/tr&gt;
  &lt;/table&gt;
  &lt;input type=\"hidden\" name=\"tuturl\" value=\"$tuturl\" /&gt;
  &lt;input type=\"hidden\" name=\"tutid2\" value=\"$tutid2\" /&gt;
  &lt;/form&gt;
  
  
  &lt;/div&gt;
  ";
  }
  ?&gt;
  </code></pre>