I need a counter type program were I can store a number that increments after each registration so i know how many users i have.
count.log stores a 10 digit number starting with 0000000001 - for the first user.
then I want the script to read the number and create a dbm file called 0000000001.db which will store the user information for user 1.
and the same thing with user 2 and so on. Every time the script is called it adds one and creates a file.
Can you write me a php code that will read the log file and print the number. I can take care of the rest.
<?
// add one to the file
open($countlog, "?")
write($countlog)
close($countlog)
?>
<?
// read the file
open($countlog, "?")
read($countlog)
close($countlog)
?>
<?
// print the next user number
print $countnum;
?>
please edit the code for me. thanx