Re: Empty $_POST after submit.
| From: | Sorin Badea | Date: | Thu, 04 Apr 2013 11:09:05 +0000 |
| Subject: | Re: Empty $_POST after submit. | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-320776@lists.php.net to get a copy of this message | ||
I've tried the same code on a instance with fedora 17 and php 5.4.13. It seems to work fine. Can you provide us a link with the url to your page ?
On 04/04/2013 01:59 PM, Ninad wrote:
yes you are right.... On 04/04/2013 04:23 PM, Sorin Badea wrote:-- Badea Sorin (unu.sorin) sorin.badea91@gmail.com <mailto:sorin.badea91@gmail.com> unu_sorin@yahoo.com <mailto:unu_sorin@yahoo.com> Pagina personala: http://badeasorin.comSo you have a single php file with the code from the first email and the $_POST var is empty. Am I right ? On Thu, Apr 4, 2013 at 1:49 PM, Ninad <ninadshaha@iitb.ac.in <mailto:ninadshaha@iitb.ac.in>> wrote:Hi,I am using httpd as a web server with default configuration.Regards, Ninad.On 04/04/2013 04:11 PM, Sorin Badea wrote:What are you using on the server for http ? nginx or apache ? can you give us more details about your configuration (mods, configuration, htaccess ) ?On Thu, Apr 4, 2013 at 1:25 PM, Ninad <ninadshaha@iitb.ac.in <mailto:ninadshaha@iitb.ac.in>> wrote:Hello,Thanks for such a fast response.Yes I tried bellow things but result is same --- no output..$postdata = file_get_contents('php://input'); var_dump($postdata); var_dump($_POST);Regards, Ninad.On 04/04/2013 03:50 PM, Sorin Badea wrote:Hi, Did you tried a print_r($_POST) or a var_dump ?On Thu, Apr 4, 2013 at 1:10 PM, Ninad <ninadshaha@iitb.ac.in <mailto:ninadshaha@iitb.ac.in>> wrote: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.-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php-- Badea Sorin (unu.sorin) sorin.badea91@gmail.com <mailto:sorin.badea91@gmail.com> unu_sorin@yahoo.com <mailto:unu_sorin@yahoo.com> Pagina personala: http://badeasorin.com-- Badea Sorin (unu.sorin) sorin.badea91@gmail.com <mailto:sorin.badea91@gmail.com> unu_sorin@yahoo.com <mailto:unu_sorin@yahoo.com> Pagina personala: http://badeasorin.com