Results 1 to 2 of 2

Thread: Username Suggestions Script

  1. #1
    Join Date
    Mar 2010
    Posts
    22
    Thanks
    6
    Thanked 1 Time in 1 Post

    Default Username Suggestions Script

    Hi,
    I want to make a user account form for my client in which I want to have a username and password , confirm password fields. If the username is already taken a set of 5 choices taking the first name, last name, year of birth etc. are generated and given to the user. Once the username has been validated and password is confirmed by entering twice, the user presses the submit button and an auto-generated email is sent to the email address provided which need to be clicked to activate the account.

    Once the account is activated the user can perform tasks in his account. Apart from these functionalities I was also wondering hwo to get the users first name on the top right corner with a welcome message. "" Welcome ((user's first name)) "" or "" Welcome Guest "" if no account is being generated..
    I know its possible. but how i don't actually know. is PHP the only scripting language i can use or can i use python for this?
    Please help

  2. #2
    Join Date
    Mar 2008
    Posts
    122
    Thanks
    17
    Thanked 5 Times in 5 Posts

    Default

    $_SESSION['username'] = 'username';

    assuming that you are using session:

    PHP Code:

    if($_SESSION['logged_in'])
    {
        
    $_SESSION['username'] = "Whaterver";
    }
    else
    {
        
    $_SESSION['username'] = "Guestt";


Bookmarks

Posting Permissions

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