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.
This is my example code:
<?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 '<a href = "' . $folderPath . $albumName. '.xml' . '">XML FILE</a>';
}
else{
$outputForm = 1;
}
if($outputForm == 1)
{
//Here follows my input form
<?php
}
?>
FYI:
$folderPath = 'c:/htdocs/output/';
Therefore:
$folderPath . $albumName = 'c:/htdocs/output/jessi';
In this example xml file name:
jessi.xml
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.
Any ideas how I can embed a href link in the php script to either Download/Display the XML file.
Thanks