run the script only once?
- by fusion
being new to php and coming from asp.net, i would like to know if there is an equivalent of IsPostBack, which calls a function or a method only once, once the user is logged in.
i have a facebook application, in which once the user authorizes the application it should enter his details in the database. this basic stuff should have been done using the post-authorize callback url which facebook pings when the user first authorizes the app, but somehow that is not working; hence i have to do it manually.
the issue is that, since i'm checking whether the user exists or not in index.php, i would not like index.php to run this code repeatedly for the same user when the user goes to the homepage every time.
any ideas?