derick Sun Aug 17 15:09:25 2003 EDT
Modified files:
/phpdoc/en/faq html.xml
Log:
- Pretty up examples
Index: phpdoc/en/faq/html.xml
diff -u phpdoc/en/faq/html.xml:1.21 phpdoc/en/faq/html.xml:1.22
--- phpdoc/en/faq/html.xml:1.21 Tue Apr 8 23:22:19 2003
+++ phpdoc/en/faq/html.xml Sun Aug 17 15:09:25 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.21 $ -->
+<!-- $Revision: 1.22 $ -->
<chapter id="faq.html">
<title>PHP and HTML</title>
<titleabbrev>PHP and HTML</titleabbrev>
@@ -49,7 +49,7 @@
<programlisting role="php">
<![CDATA[
<?php
- echo "<input type=hidden value=\"" . htmlspecialchars($data) . "\">\n";
+ echo "<input type='hidden' value='" . htmlspecialchars($data) . "'>\n";
?>
]]>
</programlisting>
@@ -69,7 +69,7 @@
<programlisting role="php">
<![CDATA[
<?php
- echo "<textarea name=mydata>\n";
+ echo "<textarea name='mydata'>\n";
echo htmlspecialchars($data)."\n";
echo "</textarea>";
?>
@@ -93,8 +93,8 @@
<programlisting role="php">
<![CDATA[
<?php
- echo "<a href=\"" . htmlspecialchars("/nextpage.php?stage=23&data=" .
- urlencode($data)) . "\">\n";
+ echo "<a href='" . htmlspecialchars("/nextpage.php?stage=23&data=" .
+ urlencode($data)) . "'>\n";
?>
]]>
</programlisting>
@@ -233,7 +233,7 @@
are all passed with the same widget name. ie.
<programlisting role="html">
<![CDATA[
-<select name="var" multiple>
+<select name="var" multiple="yes">
]]>
</programlisting>
Each selected option will arrive at the action handler as:
@@ -248,7 +248,7 @@
should be used:
<programlisting role="html">
<![CDATA[
-<select name="var[]" multiple>
+<select name="var[]" multiple="yes">
]]>
</programlisting>
This tells PHP to treat <varname>$var</varname> as an array and
@@ -307,7 +307,7 @@
// (preserve the original query string
// -- post variables will need to handled differently)
- echo "<script language=\"javascript\">\n";
+ echo "<script language='javascript'>\n";
echo " location.href=\"${_SERVER['SCRIPT_NAME']}?${_SERVER['QUERY_STRING']}"
. "&width=\" + screen.width + \"&height=\" + screen.height;\n";
echo "</script>\n";
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php