hey,
I have posted before about this, but this is a different subject:
I am trying to create a site like neopets.com
what I would like to do is beable to use money on the script,
When u register it adds all ur details to a php file:
username:encoded password:0:email addy:age:money ammount
For The money I want to beable to increase it and decrease it,
So like if the user has 200, and spends 75, how can i take it away using this script:
<INPUT TYPE='hidden' NAME='price' value='75'><
<INPUT TYPE='hidden' NAME='level' size=10 value='1'><input type=hidden name="submit" value=" Set ">
<input type=submit Value=Buy>
<?php
} else {
$userlist = file("file name");
$done = false;
$auth = false;
$found = false;
$i = 0;
while ((!$found) && ($i<count($userlist))) {
$i++;
list($n,$p,$a,$e,$g,$m) = explode(':',$userlist[$i]);
$found = ($n==$user);
} if ($????!="") $m = <not sure wat to put here>;
$userlist[$i] = implode(':',array($n,$p,$a,$e,$g,$m));
$fd = fopen("file name","w");
fputs($fd,"<?php die(\"Access restricted\"); ?>\n");
for ($i=1; $i<count($userlist); $i++) {
fputs($fd,chop($userlist[$i])."\n");
}
fclose($fd);
echo "<center><b>Thanks for your purchase</b>";
}
This script was used for changing account password, so i am not sure wat needs changing. thanks for everyones help