You can use the $_GET function across URLs. Otherwise you could create a session or a cookie and store the information about a user.
$_GET uses data from the URL. You define this first by using a question mark and then the variable name followed by an equals sign and then the value. You can add multiple variables separated by 'and' symbols. You can use this to transfer data across pages. For example, you could create a list of the variables that need to be linked to and then create a URL structure:
$firstname = "Jane";
$lastname = "Doe";
$phone = "0123456789";
$mobile = "9876543210";
$URL = "secondpage.php?firstname=".$firstname."&lastname=".$lastname."&phone=".$phone."&mobile=".$mobile;
This would mean, under these circumstances, that $URL would echo as "secondpage.php?firstname=Jane&lastname=Doe&phone=0123456789&mobile=9876543210". You could link to this URL and then on secondpage.php you could GET the variables as follows:
$firstname = $_GET['firstname'];
$lastname = $_GET['lastname'];
$phone = $_GET['phone'];
$mobile = $_GET['mobile'];
However, some people may consider this to be messy or you may not wish for your users to be able to edit the values. If they edit the URL, they might be able to change how the page functions or inject malicious code. To solve this you can use the $_SESSION function instead, this data is stored on the server and cannot be changed.
To do this you need to begin the session with the following function on both pages:
session_start();
You can then define variables on the first page like this:
$_SESSION['firstname'] = "Jane";
$_SESSION['lastname'] = "Doe";
$_SESSION['phone'] = "0123456789";
$_SESSION['mobile'] = "9876543210";
and then you are able to call these variables across the site. The only problem with this is that the session could run out and may need to be redefined. You can use the public variables in the same way you would use any others, the only difference being is that they are global to the server.
echo "Welcome back, ".$_SESSION['firstname']."!"; //echos as "Welcome back Jane!"