you have page1.php, page2.php and page3.php.
page1.php has a submit button that direct you to page3.php,
page2.php has a submit button that direct you to page3.php.
How do programmers usually check if you came to page3.php from page1.php, page2.php, anyotherpage at this site or any other site or came to page3.php from about:blank page?

I need to use it when I work an If-Else statement.
Thank you.