Results 1 to 4 of 4

Thread: Adding user's name dynamically

  1. #1
    Did someone said Pizza :) FanacooL's Avatar
    Join Date
    Oct 2004
    Location
    Karachi , Pakistan
    Posts
    466

    Adding user's name dynamically

    I am making an online form where only members can log in, and they complete the forms what i want is that in the submitted by field the name of the user should come automatically (the person who just logged in and filling the form).

    I have two things in mind one is that they complete the form fields excluding there name and when he/she submit the name should go directly to my DB. or there should be a field containing there name which they can't change.

    So which option is best and how should i do that and if there is other alternatives what are they ?

    I am only a newbie as fas as web development is concerned can use ultradev or dreamweaver to make pages as far as coding is concerned . so is this achievable for me or not?
    One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man!

  2. #2
    Banned
    Join Date
    Nov 2005
    Posts
    62
    well i'm having trouble understanding your question but you need to store you the username in some type of session data after the user logs in if you want to access whenever, if you're using php, then session_start(); and $_SESSION['username'] = username; will suit you well after the user logins in and then you can use if(isset($_SESSION['username'])) { blah; } else { blah; }

    :-)

  3. #3
    Did someone said Pizza :) FanacooL's Avatar
    Join Date
    Oct 2004
    Location
    Karachi , Pakistan
    Posts
    466
    Its simple like you logged in antionline website and you can see welcome "your name" like that i want this name of user to come in a text field of my form. Using vb srcipt and ASP.
    One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man!

  4. #4
    Banned
    Join Date
    Nov 2005
    Posts
    62
    Session('username') = 'username';

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •