philip Sat Jun 28 16:31:17 2003 EDT
Modified files:
/phpdoc/en/language variables.xml
Log:
In example: replace long arrays with autoglobals, and eliminate E_NOTICE
Index: phpdoc/en/language/variables.xml
diff -u phpdoc/en/language/variables.xml:1.65 phpdoc/en/language/variables.xml:1.66
--- phpdoc/en/language/variables.xml:1.65 Sun Jun 22 17:34:32 2003
+++ phpdoc/en/language/variables.xml Sat Jun 28 16:31:17 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.65 $ -->
+<!-- $Revision: 1.66 $ -->
<chapter id="language.variables">
<title>Variables</title>
@@ -856,16 +856,15 @@
<programlisting role="php">
<![CDATA[
<?php
-if ($HTTP_POST_VARS['action'] == 'submitted') {
+if (isset($_POST['action']) && $_POST['action'] == 'submitted') {
print '<pre>';
-
- print_r($HTTP_POST_VARS);
- print '<a href="'. $HTTP_SERVER_VARS['PHP_SELF'] .'">Please try again</a>';
+ print_r($_POST);
+ print '<a href="'. $_SERVER['PHP_SELF'] .'">Please try again</a>';
print '</pre>';
} else {
?>
-<form action="<?php echo $HTTP_SERVER_VARS['PHP_SELF']; ?>" method="POST">
+<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
Name: <input type="text" name="personal[name]"><br>
Email: <input type="text" name="personal[email]"><br>
Beer: <br>
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php