I'm slowly learning PHP ;-) I'm having difficulties understanding how separate PHP-files work together.
I make AJAX calls to different php files that all need to be connected to the backend (Parse). Such as:
sign_up.php
login.php
verify_email.php
get_something_out_of_the_database.php
What is the standard way to stay logged in over the different php files? (or what is the google search term for it..?)
Update: Thanks for all your answers about 'sessions'. I doesn't work very well yet, so i made a new question.
Thanks!
Remzo
session_start()and include this file, anywhere you need to authenticate a user or provide some thing base on sessionsstay logged in over the different php fileshow about bootstraping your application. Means: every call is redirected toindex.phpand there you can check for loggin and so on. Thats how frameworks do it. OldSchool but also works: use autoprepend function from php php.net/manual/en/ini.core.php#ini.auto-prepend-file and do the checks there.(less code work for you)