you create a link
$url = "http://www.someplace.com/page.php";
Then add to the end the variable name, WITH a question mark
$url = "http://www.someplace.com/page.php?message";
Then you add the text/message that you want to pass to the other page. But first you need to run the value of $message through urlencode()
$message = "Hi there. How are you?";
$message = urlencode($message);
$url = "http://www.someplace.com/page.php?message=".$message;
now echo the value of $url like this:
<?php
echo "<a href='".$url."'>Link text</a>";
?>
in the outputted HTML, you will see something like
Hi+there%2C+how+are+you%3F
<?php
$message = "Hi there, how are you?";
echo urlencode($message);
//urlencode() will result in this
//Hi+there%2C+how+are+you%3F
echo rawurlencode($message);
//rawurlencode() will result in this
//Hi%20there%2C%20how%20are%20you%3F
?>
Make sure that you use the corresponding decode function on/in the page that you are sending the message to.
urldecode()
or
rawurldecode()