Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2007
    Location
    UK
    Posts
    2,470
    Tokens
    2,975

    Latest Awards:

    Default RadiPanel Shoutbox Help +Rep

    Im in the process of coding a shoutbox for radipanel, and i was wondering how i would go about fetching the names from the database, so people dont put in there name manually, because that could cause problems as people impersonating others

    Thanks!

    +Rep for all help!

  2. #2
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    PHP Code:
    $username_query $db->query"SELECT username FROM users WHERE id =  '{$array['author']}'" );
    $username_array $db->assoc$username_query );
    $username $username_array['username']; 
    Something like that

  3. #3
    Join Date
    Jul 2007
    Location
    UK
    Posts
    2,470
    Tokens
    2,975

    Latest Awards:

    Default

    Thanks for that! +Rep

    Were abouts would it be stuck in, in place of a username field?

    EDIT: Sorry gotta spread!

  4. #4
    Join Date
    Sep 2009
    Location
    Hull
    Posts
    827
    Tokens
    0

    Latest Awards:

    Default

    Why not put it in a hidden field? or fetch the session?

    Lew.
    Im not here to be loved, I love to be hated :-}


  5. #5
    Join Date
    Oct 2007
    Posts
    824
    Tokens
    71

    Latest Awards:

    Default

    It's hard to tell you where to grab the username and where to store it when we can't see the code and don't know the table names.

Posting Permissions

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