I'm developing app for Facebook. Here when user open application should be checked If user already exists in database. I think I will use $_SESSIONto pass user's Id to checkIfExsists.php
So my FacebookGetId.php looks like:
<?php
...
$id = $user_profile['id'];
$_SESSION['id'] = $id;
?>
So $id for now is i.e. '12345' I just don't know how to make automatically redirect to checkIfExsists.php to check If that Id already exsists in database.
It should be something like: When application is launched, It should take User's Id and automatically redirect to checkIfExsists.phpand pass that Id.
If user exists checkIfExsists.php should redirect user to application.php, if not exists - It should redirect to registration.php
checkIfExsists.phpshould redirect user toapplication.php, if not exists - It should redirect toregistration.phphttp_redirect("relpath", array("name" => "value"), true, HTTP_REDIRECT_PERM);. for more information Visit thislink, it will help you.