Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2005
    Posts
    6

    Unanswered: log in page, show username etc

    I have now created a log in page which is working very well, can someone please help me as I have been stuck for 3 days now, after someone has logged in I want to have this info displayed:

    Welcome member '(username)'
    Your password is '(password)'

    Thank you

    PLEEEEEEASE help!

    I am using php, mysql and dreamweaver 8.

    if you need a snippet of code please guide me what it is you need as I am a real beginner.

  2. #2
    Join Date
    Apr 2005
    Location
    Baltimore, MD
    Posts
    297
    Super simple version would be something like this:
    PHP Code:

    //user is already logged in, so you must have access to a userid?

    $sql "SELECT * FROM users WHERE userid=$userid";

    $result mysql_query($sql);

    $row mysql_fetch_assoc($result);

    echo 
    "Your username is: $row['username']";
    echo 
    "Your password is: $row['password']";

    //etc... 
    (p.s. I got your pm earlier today and didn't reply because I saw that you had the login working.)

  3. #3
    Join Date
    Dec 2005
    Posts
    6
    Thanks for the help, I will try this tomorrow and let you know how I got on, if I start it know I will be on this pc all night as well, I will be a single man soon!!

    Trev

  4. #4
    Join Date
    Aug 2004
    Location
    San Antonio, TX
    Posts
    84
    Save the information in session variables. You can then access the information anytime you want.

Posting Permissions

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