RE: [PHP] Problem with the post variables.
| From: | Wouter van Vliet | Date: | Mon, 18 Aug 2003 16:35:09 +0000 |
| Subject: | RE: [PHP] Problem with the post variables. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-159931@lists.php.net to get a copy of this message | ||
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
Wouter
-----Oorspronkelijk bericht-----
Van: Klaus Kaiser Apolinário [mailto:klaus@curitibaonline.com.br]
Verzonden: maandag 18 augustus 2003 16:04
Aan: php-general@lists.php.net
Onderwerp: [PHP] Problem with the post variables.
Guys I have a problem here.
I'm using PHP 4.3.2 and httpd 1.3.28.
Look my exemple.
I have a page whith a Form method post, and I submit this page to
teste2.php, but I dont can request de data from the text box...
#######################
This is the test page
<html>
<body>
<form action="teste2.php" method="post"
enctype="multipart/form-data">
<input type="text" name="texto">
<input type="submit" value="ok">
</form>
</body>
</html>
#####################
Teste2.php
<?php
$string = $_POST['texto'];
echo "Var em post: ".$string."<br>";
echo "Var em get: ".$_GET['texto']."<br>";
//phpinfo();
?>
############################################
Some one can help me...???
Klaus Kaiser Apolinário
Curitiba online