cvs: phpdoc /en/faq html.xml
| From: | Jeroen van Wolffelaar | Date: | Tue, 06 Nov 2001 20:59:14 +0000 |
| Subject: | cvs: phpdoc /en/faq html.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969338523@lists.php.net to get a copy of this message | ||
jeroen Tue Nov 6 15:59:14 2001 EDT
Modified files:
/phpdoc/en/faq html.xml
Log:
Another example, the one for which I eventually wrote this...
Index: phpdoc/en/faq/html.xml
diff -u phpdoc/en/faq/html.xml:1.8 phpdoc/en/faq/html.xml:1.9
--- phpdoc/en/faq/html.xml:1.8 Tue Nov 6 15:51:27 2001
+++ phpdoc/en/faq/html.xml Tue Nov 6 15:59:14 2001
@@ -1,5 +1,5 @@
<?xml encoding="iso-8859-1"?>
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
<chapter id="faq.html">
<title>PHP and HTML</title>
<titleabbrev>PHP and HTML</titleabbrev>
@@ -62,6 +62,30 @@
</simpara>
</note>
<example>
+ <title>Data to be edited by the user</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+ echo "<textarea name=mydata>\n";
+ echo htmlescape($data)."\n";
+ echo "</textarea>";
+?>
+]]>
+ </programlisting>
+ </example>
+ <note>
+ <simpara>
+ The data is shown in the browser as intended, because the browser will
+ interpret the html escaped symbols.
+ </simpara>
+ <simpara>
+ Upon submitting, either via GET or POST, the data will be urlencoded
+ by the browser for transferring, and directly urldecoded by PHP. So in
+ the end, you don't need to do any urlencoding/urldecoding yourself,
+ everything is handeled automagically.
+ </simpara>
+ </note>
+ <example>
<title>In an URL</title>
<programlisting role="php">
<![CDATA[
@@ -95,6 +119,7 @@
</simpara>
</note>
</para>
+ <!-- TODO: a note about addgpcslashes? -->
</answer>
</qandaentry>