Web Hosting Talk







View Full Version : How do i auto insert nickname for the chat script 'Blab-Lite' ?


latheesan
09-10-2005, 05:16 PM
Im currently using blab-lite (a stylish yet fast php chat script) and i want to know how i can auto insert the logged in member's username into the nick name field

for e.g. my username variable comes from the session.php file, like this

<?php

include ("members/session.php");
$username = $session->username;

//here is the login box for the chat script

?>


i want to know, how to put the variable in the string $username into the nickname field in the chat script automatically and not allow him/her to overwrite on it, i.e. the nick name should be the same as the username he/she loged in with

ohh yea, the link to the chat script is: http://hot-things.net/blab_lite.php

jetson
09-11-2005, 12:25 AM
Assuming the username field is a form field...

Why not change the username from input type="text" to input type="hidden" with a value="<? print($username); ?> and when they submit that will be the username??

latheesan
09-11-2005, 08:02 AM
i see, let me try that

latheesan
09-11-2005, 08:19 AM
Thank you very much jetson, very nice suggestion. Worked well :D