General Community > Scripting Help

need some help with a custom chat


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: ---<?php require("SSI.php"); ?>
if ($context['user']['is_admin'])
<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>
else {
echo '<font color=white>You Must Be Staff To Post Messages In Chat</font>'; }

--- End code ---

so i managed to figure it out but thanks for trying to help


[0] Message Index

Go to full version