title: PHP Link generator - design path
body: <p>I'm building a website in which the download link for files will be generated at runtime by connecting to a database and getting the current download link from there.</p>
  
  <p>I was wondering whats the best design path i should take to implement it.</p>
  
  <p>What i have in mind so far, is having a linker.php file which i'll include in all pages of the site (Where there's a download link), and in this file i'll auto-fill a <code>$downloadLink</code> variable and just use     <code>&lt;?php echo $downloadLink; ?&gt;</code> wherever i need to use that download link.</p>
  
  <p>Is this the right way to go?</p>
  
  <p>Should I just have the linker.php file auto-execute?</p>