$fp = @fopen("here.txt", "rb");
while(!feof($fp))
{
$data .= fgets($fp1, 1024);
}
$here = explode("\r\n", $data);
if($name==$here[0]){
echo 'you left the chat';
$stay = "$here[1]\r\n";
}else{
if($name==$here[1]){
echo 'you left the chat';
$stay = "$here[0]\r\n";}
$open_file = fopen("here.txt", "w");
fputs($open_file,$stay);
is there a easyier way with more user?