Okay.. Thanks a lot..
On Sunday, April 21, 2013 10:29:34 PM UTC+8, asgallant wrote:
>
> Here's an example PHP script for taking in data from a form and creating
> an XML document based on it:
>
> <?php
> /* method is set as an HTML form attribute, eg <form method="GET">
> * all fields passed in from the form are available in either the $_POST
> or $_GET variables (whichever you chose as the form's method)
> * access them by their "name" attributes, ex:
> * <input type="text" name="title" />
> * would be accessed like this from GET:
> */
> $bookTitle = $_GET('title');
> // or this from POST
> $bookTitle = $_POST('title');
>
> $doc = new DOMDocument('1.0');
> // we want a nice output
> $doc->formatOutput = true;
>
> // create a "book" element
> $root = $doc->createElement('book');
> $root = $doc->appendChild($root);
>
> // create a "title" element within the "book" element
> $title = $doc->createElement('title');
> $title = $root->appendChild($title);
>
> // set the text of the "title" element to the title passed in from the form
> $text = $doc->createTextNode($bookTitle);
> $text = $title->appendChild($text);
>
> // save the new XML
> $doc->save('books.xml');
> ?>
>
> On Sunday, April 21, 2013 3:38:11 AM UTC-4, Zoro Swordsman wrote:
>>
>> May I know which scripting language is the easiest to understand? Because
>> now I just using the HTML5 to create the form (textbox, label) to let user
>> to key in the value or data. Then I need to past the value of the textbox
>> to the XML. I'm sorry because I'm just a beginner for this. So do not know
>> much yet. Hope you can show me a simple source code. Thanks.
>>
>> On Sunday, April 14, 2013 4:16:24 PM UTC+8, Zoro Swordsman wrote:
>>>
>>> Hi,I want to create a form with textbox to let user key in the data and
>>> then it will link to the xml file and update the data in the xml file based
>>> on what user key in.. is there anyone know about this coding? thanks..
>>
>>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.