Empty $_POST after submit.

From: Date: Thu, 04 Apr 2013 10:10:40 +0000
Subject: Empty $_POST after submit.
Groups: php.general 
Request: Send a blank email to php-general+get-320764@lists.php.net to get a copy of this message
Dear all, I am having 2 servers. One is running fedora 10 with php 5.2.6-5 and second one is running fedora17 with php 5.4.13. Below given code is working absolutely fine on fedora10 with php5.2 But the same code is not working on fedora17 with php 5.4.13. After submit I am getting $_POST variable empty. Please guide me in the same. <?php if (isset($_POST['lastname'], $_POST['lastname'])) { echo("First name: " . $_POST['firstname'] . "<br />\n"); echo("Last name: " . $_POST['lastname'] . "<br />\n"); } ?> <html> <head> </head> <body> <form action="index.php" method="post"> <p>First name: <input type="text" name="firstname" /></p> <p>Last name: <input type="text" name="lastname" /></p> <input type="submit" name="submit" value="Submit" /> </form> </body> </html> Thanks & Regards, Ninad.

« previous php.general (#320764) next »