Using this code how can i make it add the $price to a different user's account?
(the page this code is on is a donation form, it donates money from the user that is on the page, to a different user: admin,
There is a form above the code, but that is not importent
<?php
} else {
$userlist = file("users.inc.php");
$done = false;
$auth = false;
$found = false;
$i = 0;
while ((!$found) && ($i<count($userlist))) {
$i++;
list($n,$p,$a,$e,$g,$s,$m,$a1) = explode(':',$userlist[$i]);
$found = ($n==$user);
echo "<br>Error";
} if ($m <= $price) { die("<br><b>Error: You don't have enough money 🙁</b><br>"); }
elseif ($m >= $price) {
$m -= $price;
$m = ($m < $price) ? $m : $m;
$userlist[$i] = implode(':',array($n,$p,$a,$e,$g,$s,$m,$a1));
$fd = fopen("users.inc.php","w");
fputs($fd,"<?php die(\"Access restricted\"); ?>\n");
for ($i=1; $i<count($userlist); $i++) {
fputs($fd,chop($userlist[$i])."\n");
}
fclose($fd);
echo "<script>window.opener.document.location.reload(); window.close();</script>";
}
?>
Thanxs for all help