Example: Passing Variables in a URL

Code:
<?
   $testvar 
"This is a test";

   
/* The urlencode function translates special characters such as spaces
      so that they will be passed through to the page correctly. */

   
echo "<A HREF=\"ex10.php?testvar=",urlencode($testvar),
   
"\">Another Test Page</A>";
?>

Output:

Another Test Page

Click here to see the complete source code for this page