title: Pass Dynamic PHP variables to other PHP page via URL
body: <p>I think the question is clear from the heading.
  I have a PHP file, call it PHP1. In that PHP1, I have a URL looking pretty much like </p>
  
  <p><code>www.mywebsite/script.php?color=red&amp;sky=blue&amp;past=gone</code></p>
  
  <p>Where I am confused is that the values 'red' and 'blue' and 'gone' are in three dynamic variables: <code>$var1</code>, <code>$var2</code> and <code>$var3</code>.</p>
  
  <p>How can I post these variables through URL into a second PHP file, PHP2.</p>
  
  <p>In the PHP2 file, I want to recieve the values like:</p>
  
  <pre><code>$var1 = $_GET['color'];
  $var2 = $_GET['sky'];
  $var3 = $_GET['past'];
  </code></pre>
  
  <p>How can I achieve this? I know I can use ajax and all, but URL is my only resort here.</p>