PHP, how include variables from another file identified a URL variable
<p>I'm looking to do something really rather simple but I'm quite new to PHP so please pardon my naivety.</p>

<p>My requirement is to have a simple page (here on referenced as <strong>base</strong>) which will be populated by values from another file (here on referenced as <strong>inc</strong>). The output HTML from <strong>base</strong> may look something like this:</p>

<pre><code>    &lt;h2&gt;Name: [dynamic string (e.g. Joe Bloggs) ]&lt;/h2&gt;
    &lt;h2&gt;Age: [dynamic value (e.g. 31) ]&lt;/h2&gt;
    &lt;h2&gt;Bio: [dynamic string (e.g. I was born and raised in the UK. My special features are rocket boots.)&lt;/h2&gt;
</code></pre>

<p>I plan on using a URL parameter (e.g. "www.mydomain.com/base.php?id=1234") to identify the name of the <strong>inc</strong> file that will be used in a <code>get</code> request.</p>

<p>I'm not exactly sure if this is the best way to go about it, but as this is a REALLY simple project I want to avoid using mySQL or anything else to complicate matters in production.</p>

<p>Please can you advise:</p>

<ol>
<li>How should I construct the <strong>inc</strong> PHP file? Would it be best to create the variables in this as a form or array?</li>
<li>How can I configure the <strong>base</strong> PHP to pull in the variables that are set in an external file</li>
</ol>

<p>Please let me know if my logic is way off &amp; this is completely the wrong way to go about it!</p>

<p>As I mentioned before, this is a very simple project so I would like to stick to raw PHP (no 3rd party tools) as I'm using this to educate myself. Thank you for any help!</p>
