[PHP-DOC] cvs: phpdoc /en/functions http.xml From: Jani Taskinen (sniper <email protected>)
Date: 08/15/00

sniper Tue Aug 15 16:38:44 2000 EDT

  Modified files:
    /phpdoc/en/functions http.xml
  Log:
  Fixed bug #6162.
  
  
Index: phpdoc/en/functions/http.xml
diff -u phpdoc/en/functions/http.xml:1.7 phpdoc/en/functions/http.xml:1.8
--- phpdoc/en/functions/http.xml:1.7 Wed Aug 9 03:18:38 2000
+++ phpdoc/en/functions/http.xml Tue Aug 15 16:38:44 2000
@@ -121,11 +121,11 @@
      <funcprototype>
       <funcdef>int <function>setcookie</function></funcdef>
       <paramdef>string <parameter>name</parameter></paramdef>
- <paramdef>string <parameter>value</parameter></paramdef>
- <paramdef>int <parameter>expire</parameter></paramdef>
- <paramdef>string <parameter>path</parameter></paramdef>
- <paramdef>string <parameter>domain</parameter></paramdef>
- <paramdef>int <parameter>secure</parameter></paramdef>
+ <paramdef>string <parameter><optional>value</optional></parameter></paramdef>
+ <paramdef>int <parameter><optional>expire</optional></parameter></paramdef>
+ <paramdef>string <parameter><optional>path</optional></parameter></paramdef>
+ <paramdef>string <parameter><optional>domain</optional></parameter></paramdef>
+ <paramdef>int <parameter><optional>secure</optional></parameter></paramdef>
      </funcprototype>
     </funcsynopsis>
     <para>
@@ -152,14 +152,23 @@
      <parameter>secure</parameter> indicates that the cookie should
      only be transmitted over a secure HTTPS connection.
     </para>
- <para>
+ <para>
      Common Pitfalls:
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Cookies will not become visible until the next loading of a page that
+ the cookie should be visible for.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Cookies must be deleted with the same parameters as they were set with.
+ </simpara>
+ </listitem>
+ </itemizedlist>
     </para>
     <simpara>
- Cookies will not become visible until the next loading of a page that
- the cookie should be visible for.
- </simpara>
- <simpara>
      In PHP3, multiple calls to <function>setcookie</function> in the same
      script will be performed in reverse order. If you are trying to
      delete one cookie before inserting another you should put the
@@ -167,13 +176,24 @@
      <function>setcookie</function> are performed in the order called.
     </simpara>
     <para>
- Some examples follow:
+ Some examples follow how to send cookies:
      <example>
- <title><function>setcookie</function> examples</title>
+ <title><function>setcookie</function> send examples</title>
       <programlisting role="php">
 setcookie ("TestCookie", "Test Value");
 setcookie ("TestCookie", $value,time()+3600); /* expire in 1 hour */
 setcookie ("TestCookie", $value,time()+3600, "/~rasmus/", ".utoronto.ca", 1);
+ </programlisting>
+ </example>
+ </para>
+ <para>
+ Examples follow how to delete cookies send in previous example:
+ <example>
+ <title><function>setcookie</function> delete examples</title>
+ <programlisting role="php">
+setcookie ("TestCookie");
+setcookie ("TestCookie", "",time());
+setcookie ("TestCookie", "",time(), "/~rasmus/", ".utoronto.ca", 1);
       </programlisting>
      </example>
     </para>