Hi all,
I'm outputing some data from a Web Form to a .XML file. This works fine, I used some code from the net
, however, it won't append the variable filename which a user enters with <filename>".xml". It just calls the file ".xml" and missus the name bit out. 
It gets the data via the POST method from another .php file, which has the Form on it. I don't undersand why it's not showing the $xmlFileName part before the .xml is added. The form works as it's getting other variables which a user enters and adding them into the .xml file, so why not the file name?
Thanks for any help. It's driving me crazy!
I'm outputing some data from a Web Form to a .XML file. This works fine, I used some code from the net


Code:
if (isset($_POST['create_itinerary']))
{
$xmlfileName = $_POST['xmlFileName'];
}
...
$default_dir = "C:/<folder1>/<folder2>/";
$default_dir .= $xmlFileName .".xml";
// Store the File
$fp = fopen($default_dir,'w');
fwrite($fp,$xml_doc);
fclose($fp);
...
It gets the data via the POST method from another .php file, which has the Form on it. I don't undersand why it's not showing the $xmlFileName part before the .xml is added. The form works as it's getting other variables which a user enters and adding them into the .xml file, so why not the file name?
Thanks for any help. It's driving me crazy!