PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Ok I'm having real problems making this view how many members are online codes. NOT USING MYSQL! I'm getting really far but I'm having a problem in has I need to compare two numbers 1 of witch is in a text file (other is the time). Witch I need to load and define so I can call it against the other number. The only way I seem to be able to get the text file to show my numbers and not the array number is bye doing?
if ($timestamp < $num1) {
Include ("add.php");
}else{
Include ("take.php");
}
The add and take folders are just a counter 1 adds and 1 takes away.. I'm sure you get the idea? So any way you cant define this include ? any idea would help other then use Mysql
to the best of my knowledge you can not turn a include "" into a variable.
Have you tried if/else statements? for example: a match statement to check what the user has done, and if the user has done one thing it includes thus, and visa-versa?
I dont know howto explain it any more then I have but basicly wot i've made is a code that can be added to anypage.
When the code runs it does this..
1 //Adds 1 to hits.txt
2 //Print the current time in a txt file named the number currently in hits
3 //Make a php file also named the current hits.
*this bit need to be done next
4 //add page to the array
5 //Check all run all php files in the array
and wot i need the php files to do eg lets take the number 1
this is wots ment to happen
6 //Get the time printed in 1.txt
7 // then check to see the cuerrnt time is over 300 second
8 //if its under it means add 1 to how many users are online
9 // else remove 1 from users online.
all i need is to do is be able to call the numer printed in the text file to the curent time.