title: Download link to download XML file using href in PHP
body: <p>need a small basic help, I am creating a XML file on the fly using the parameters submitted in the form by the user. Once the form is submitted, I am jumping into PHP code and there I wanted to give a href link to Download/Display the created XML file. </p>
  
  <p>This is my example code:</p>
  
  <pre><code>&lt;?php
  
  $outputForm = 1;   
  
  if(isset($_POST['submit'])){
  $outputForm = 0
  
  //Function to generate XML file which works as expected, so that XML file is there
  createXML($folderPath, $albumName, $dateOfEntry);
  
  //My XML file is named as albumName.xml and stored in the folderPath as specified
  echo '&lt;a href = "' .  $folderPath . $albumName. '.xml' . '"&gt;XML FILE&lt;/a&gt;';
  }
   else{
              $outputForm = 1;
          }
          if($outputForm == 1)
          {     
         //Here follows my input form
       &lt;?php
         }
       ?&gt;
  
  FYI: 
  $folderPath = 'c:/htdocs/output/';
  Therefore:
  $folderPath . $albumName = 'c:/htdocs/output/jessi';
  In this example xml file name:
  jessi.xml
  </code></pre>
  
  <p>I can see the href link in the output but it does nothing when I click on it. I can also see the fullpath to the xml file when I move my cursor over the 'XML FILE' link.</p>
  
  <p>Any ideas how I can embed a href link in the php script to either Download/Display the XML file.</p>
  
  <p>Thanks</p>