PDA

View Full Version : RadiPanel Shoutbox Help +Rep



Jack!
22-06-2010, 08:30 PM
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!

Moh
22-06-2010, 08:40 PM
$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 :)

Jack!
22-06-2010, 08:49 PM
Thanks for that! +Rep

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

EDIT: Sorry gotta spread!

LMS16
22-06-2010, 09:30 PM
Why not put it in a hidden field? or fetch the session?

Lew.

Trigs
26-06-2010, 07:13 PM
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.

Want to hide these adverts? Register an account for free!