|
Posted by bruno_guedesav on 11/19/07 18:29
This has ocurred before, but if the person had find a way to solve it
or not, I've got no clue. So, here I am to ask for help.
I've created a form via pure PHP, basically a bunch of prints together
making a form. But somthing strange goes on: the form will only pass
it's fields forward under method GET, but not on POST.
Here's a snippet of code, just the basics:
print "<form name=\"postcomment\" action=\"".HTTP_ROOT."/pages/
comment.php\" method=\"POST\">\n";
print "Nome:<br/><input type=\"text\" name=\"nome\" size=\"64\" /><br /
>";
print "Email(obrigatório; não será publicado):<br/><input type=\"text
\" name=\"email\" size=\"64\" /><br />";
print "Site:<br/><input type=\"text\" name=\"url\" size=\"64\" /><br /
>";
(...)
print "</form>\n";
This is the code that creates the form. The target page has this code
in it:
//print_pre is a function that prints "<pre>".print_r(var,true)."</
pre>", for debugging
print_pre($_POST);
print_pre($_GET);
print_pre($_REQUEST);
When method is POST, here's what I get:
Array
(
)
Array
(
)
Array
(
)
But when method is GET, this comes instead:
Array
(
)
Array
(
[nome] => Bruno Guedes
[email] => bruno_guedesav%40yahoo.com.br
[url] => about%3Ablank
(...) //There are more fields, but they aren't important
)
Array
(
[nome] => Bruno Guedes
[email] => bruno_guedesav%40yahoo.com.br
[url] => about%3Ablank
(...) //Again, there *are* mroe fields, but they don't matter
[PHPSESSID] => 09772a2105568a91612fdd33d49d8212
)
So, sorry for the long post, but what's the big deal, anybody knows?
[Back to original message]
|