As I mentioned in my comment, I recommend you create a form that then saves this information (in a database, text file, or other storage option), and then another php file would extract that information. Since I believe you are new to programming, I will explain how to do it with a text file, however I HIGHLY recommend you use a database to store the information, not just because of it's speed in executing queries, but for securely storing information that might be sensative.
Form page: Index.php
<!DOCTYPE html>
<html>
<head></head>
<body>
<form method="POST" action="action.php">
<input type="text" name="message1">
<input type="text" name="message2">
<input type="submit" value="Submit">
</form>
</body>
</html>
Php page that saves the information: action.php
<?php
//receiving the values from the form:
//I also used htmlspecialchars() here just to prevent cross
//site scripting attacks (hackers) in the case that you
//echo the information in other parts of your website
//If you later decide to store the info in a database,
//you should prepare your sql statements, and bind your parameters
$message1 = htmlspecialchars($_POST['message1']);
$message2 = htmlspecialchars($_POST['message2']);
//saving the values to a text file: info.txt
$myFile = fopen('info.txt', 'w');
fwrite($myFile, $message1."
");
fwrite($myFile, $message2."
");
fclose($myFile);
?>
Then in another php file you would retrieve that information and use it in your website:
page2.php
<!DOCTYPE html>
<html>
<head></head>
<body>
<?php
$myFile = fopen('info.txt', 'r');
$message1 = fgets($myFile);
$message2 = fgets($myFile);
fclose($myFile);
echo "message1 = ".$message1;
echo "message2 = ".$message2;
?>
</body>
</html>
Let me know if that helped!