RE: [PHP] Problem with the post variables.
| From: | Wouter van Vliet | Date: | Mon, 18 Aug 2003 17:24:31 +0000 |
| Subject: | RE: [PHP] Problem with the post variables. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-159936@lists.php.net to get a copy of this message | ||
ooooooops .. my mistake .. Usually I check thing before I post, forget it
once .. that's how I make mistakes.. Anyways, I still am pretty sure setting
enctype to multipart/form-data was the problem..
'application/x-www-form-urlencoded' is indeed the correct enctype for just
posting forms .. (checked it at www.handleidinghtml.nl, interesting for the
fellow dutchmen over here ;))
-----Oorspronkelijk bericht-----
Van: Chris Shiflett [mailto:shiflett@php.net]
Verzonden: maandag 18 augustus 2003 19:09
Aan: Wouter van Vliet; Klaus_Kaiser_Apolinario;
php-general@lists.php.net
Onderwerp: RE: [PHP] Problem with the post variables.
--- Wouter van Vliet <wouter@esctoday.com> wrote:
> The problem is probably in the 'enctype="multipart/form-data"'.
> You should only use this enctype if you're gonna upload a file
> through the form. If not, just leave it away or use text/plain
Posted data isn't text/plain, it's something like
application/x-www-form-urlencoded.
For the original poster, find a simple example and build on that rather than
trying to learn too many things at once. This might be a good start:
<form method="post">
<input type="text" name="foo" /><br />
<input type="submit" />
</form>
<p>$_POST array:</p>
<pre>
<? print_r($_POST); ?>
</pre>
Hope that helps.
Chris
=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/