You are here: Re: $_POST array returns no data « PHP Programming Language « IT news, forums, messages
Re: $_POST array returns no data

Posted by Grant on 07/12/07 09:16

<techusky@gmail.com> wrote in message
news:1184196940.535486.324390@d55g2000hsg.googlegroups.com...
> When I try to echo the $_POST array from a VERY simple form that I've
> made for testing purposes, the array returns 0 no matter what I send
> from the form. If I change the form's method from "post" to
> "get," (and make the change from $_POST to $_GET in the php script)
> it
> runs just fine. I have also checked my php.ini file to verify that
> the
> "variables_order" directive is set to: EGPCS, the default.
>
> My web server is running on Windows XP SP2 with Apache 2.2.4 and PHP
> 5.2.1.
>
>
> Here is the code I'm working with:
>
>
> test.html:
>
>
> <html>
>
>
> <head>
> <title>test</title>
> </head>
>
>
> <body>
> <form action="./test.php" method="post">
> Feet: <input type="text" name="feet">
> <input type="submit" value="Convert">
> </form>
> </body>
>
>
> </html>
>
>
> test.php:
>
>
> <?php
>
>
> // Retrieve user's entry
> $feet = $_POST['feet'];
>
>
> // Convert $feet to $inches
> $inches = ($feet * 12);
>
>
> // Display $inches
> echo "$inches";
>
>
> ?>
>
>

The form works OK on my system (PHP5, Apache 2, XP SP2), have you checked
that POST is enabled on Apache httpd.conf <Limit>?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация