#43607 [Opn->Fbk]: I follow the documentation and get problems

From: Date: Sun, 16 Dec 2007 19:01:29 +0000
Subject: #43607 [Opn->Fbk]: I follow the documentation and get problems
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-352@lists.php.net to get a copy of this message
ID: 43607 Updated by: colder@php.net Reported By: eag2001 at terra dot es -Status: Open +Status: Feedback Bug Type: Documentation problem Operating System: Sindows XP PHP Version: Irrelevant -Assigned To: +Assigned To: colder New Comment: Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. $_POST is filled even if register_globals is off. register_globals defaults to off and should remain off as it is removed from PHP6. Previous Comments: ------------------------------------------------------------------------ [2007-12-16 17:19:24] eag2001 at terra dot es 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 this bug report at http://bugs.php.net/?id=43607&edit=1

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