Hey,
This game i have for my site, it is a guess number game,
What I am trying to do is make it so if the user wins, they get points added to their account.
I have tried many times, but failed 🙁
what I need is the script to have the following in it:
<?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,$a2,$a3) = explode(':',$userlist[$i]);
$found = ($n==$user);
echo "<br>Please Wait...";
} if ($correct) {
$m += 5;
$userlist[$i] = implode(':',array($n,$p,$a,$e,$g,$s,$m,$a1,$a2,$a3));
$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>";
}
}
?>
but when i put that in it doesn't work 🙁
is there a way to simplifly this so i can add it as part of the script that is allready made, instead of a seperat php script?