Re: view only once php block
If you do some more general research on php and build a login system you'll notice it's easy.
1. Check (in the database) whether the user can see the block.
2a. If allowed: display the block (*)
3a. Update the database
2b. If not allowed: display something else
(*) redirecting after a certain amount of time is possible in theory. In practice, you'll notice it won't always work. Two methods I can think of to redirect after a certain period are meta redirects and javascript, which both can be blocked by the client. Secondly, if you get redirected, you can just press "previous" and see the previous page... (although you might be able to fix that with some cache control headers)
Last edited by marshian; 01-29-2010 at 02:16 PM.
Real programmers don't document their code - if it was hard to write, it should be hard to understand.