run the script only once?

Posted by fusion on Stack Overflow See other posts from Stack Overflow or by fusion
Published on 2010-05-15T21:37:47Z Indexed on 2010/05/15 21:44 UTC
Read the original article Hit count: 177

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?

© Stack Overflow or respective owner

Related posts about php

Related posts about postback