Secondly i should say i am only just beginning to learn php so a lot of functions still mean little to me.
My problem is:
I am trying to create a guest book / message board for my website. It will only be used by a few people so traffic will not be high. I have created an HTML form where name and message can be put in. There is then an xml file which the form data is supposed to get stored in. I am trying to write the php script that will take the data from the form and put it into the xml file. This is what i have tried:
Code: Select all
<?php
$xml_string =
"<guest>
<name>$name</name>
<message>$message</message>
</guest>
";
$pagename = "guest.xml";
$fp=fopen("/inet/www.richard-ward.co.uk/html/".$pagename, "a+");
fwrite($fp, $xml_string);
fclose($fp);
print("Data sent to guest.xml");
?>Many thanks