#43607 [NEW]: I follow the documentation and get problems

From: Date: Sun, 16 Dec 2007 17:19:25 +0000
Subject: #43607 [NEW]: I follow the documentation and get problems
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-351@lists.php.net to get a copy of this message
From: eag2001 at terra dot es Operating system: Sindows XP PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: I follow the documentation and get problems Description: ------------ I have installed PhP in Windows SP in ISAPI. I have followed the instructions of the documentation: PHP Manual-> A simple tutorial-> Dealing with forms Example 2.6. A simple HTML form <form action="action.php" method="post"> <p>Your name: <input type="text" name="name" /></p> <p>Your age: <input type="text" name="age" /></p> <p><input type="submit" /></p> </form> and then Hi <?php echo htmlspecialchars($_POST['name']); ?>. You are <?php echo (int)$_POST['age']; ?> years old. And it does not work !!!! I have lost 2 hours to know that I can solve this problem changing the php.ini file-> register_globals to on. Why did they change to off? Is ther other any other better solution? (if they move to off from the previous vertion is because they found a way to get POST working in other better way, I presume) Why there is not documentation about this requirement? I think is important to help new people to start php without headaches, do you agree? Thanks Reproduce code: --------------- <form action="action.php" method="post"> <p>Your name: <input type="text" name="name" /></p> <p>Your age: <input type="text" name="age" /></p> <p><input type="submit" /></p> </form> and then Hi <?php echo htmlspecialchars($_POST['name']); ?>. You are <?php echo (int)$_POST['age']; ?> years old. Expected result: ---------------- Hi Emilio You are 100 years old. -- Edit bug report at http://bugs.php.net/?id=43607&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43607&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43607&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43607&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43607&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43607&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43607&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43607&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=43607&r=needscript Try newer version: http://bugs.php.net/fix.php?id=43607&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43607&r=support Expected behavior: http://bugs.php.net/fix.php?id=43607&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43607&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43607&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43607&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43607&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43607&r=dst IIS Stability: http://bugs.php.net/fix.php?id=43607&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43607&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43607&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43607&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=43607&r=mysqlcfg

« previous php.doc.bugs (#351) next »