Advertisement:

Author Topic: need some help with a custom chat  (Read 1999 times)

Offline wooki3

  • Newbie
  • *
  • Posts: 1
need some help with a custom chat
« on: February 16, 2012, 09:14:57 PM »
so ive been working on a custom chat for my buddies site, ive currently got it so that it uses the ssi to check if the user is allow in the chat but is there a way to call up the persons username so that they dont have to type it before sending a msg?
this is wat i have and i want to try to get rid of the username field and have it so that the script pulls the current users smf username instead

Code: [Select]
<?php require("SSI.php"); ?>
<html><body>
<?php
if ($context['user']['is_admin'])
{
echo'
<div>
<form action="/newstuff/staffchat/postchat.php" name="add" onsubmit="return validateForm()" method="post">
<font color=white>UserName: </font><input type="text" name="name" /><br>
<font color=white>Message: </font><input type="text" name="msg" size=65 /><br>
<input type="submit" /></form>
</div>'
;
}
else {
echo '<font color=white>You Must Be Staff To Post Messages In Chat</font>'; }
?>


</body></html>

so i managed to figure it out but thanks for trying to help
« Last Edit: February 28, 2012, 04:22:36 PM by wooki3 »