Hy to all,
i have this function, mobile chat, it delete all registred username
i would like use this function to delete a single username, for example: i choose a username from my registred username list and the function delete only the username choose. Thank you
i have this function, mobile chat, it delete all registred username
Code:
//clear ALL users
if ($viesti == "wipeusers"){
$peke = fopen('../text/nome.txt', 'r+');
ftruncate ($peke,0);
fclose($peke);
$peke = fopen('../text/pass.txt', 'r+');
ftruncate ($peke,0);
fclose($peke);
$tiedsal = fopen('../text/pass.txt', 'a');
$salasana = crypt($salasana,'password');
$lissal=$salasana.'
';
fputs($tiedsal, $lissal);
fclose($tiedsal);
$tiednim= fopen('../text/nome.txt', 'a');
$lisnim=$nimi.'
';
fputs($tiednim, $lisnim);
fclose($tiednim);
$viesti="";
$tie = fopen('../text/circ.txt', 'r+');
$ko=file_get_contents ('../text/circ.txt');
$to='[size="1"][b][url="pmuser.php?kenelle='.$nimi.'&nimi=$nimi&salasana=$salasana&rank=1&phone='.$user[0].'&ip='.$ip.'"]*[/url][/b]©'.$nimi.' wiped all users![/size]
'. $ko;
fputs($tie, $to);
fclose($tie);}
Comment