Re: Code problem: Form will only work under GET method
am 22.11.2007 06:35:37 von william.clarkeOn Nov 20, 9:04 pm, bruno_guedesav AVISO: seu coment=E1rio pode ser enviado para Coment=E1rio: Responda a esta simples pergunta: Responda a esta simples pergunta:
wrote:
> On 19 nov, 16:38, "Rik Wasmus"
>
>
>
> > On Mon, 19 Nov 2007 19:29:38 +0100, bruno_guedesav
>
> >
> > > 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 "
> > > comment.php\" method=3D\"POST\">\n";
> > > print "Nome:
/>
> > >> ";
> > > print "Email(obrigat=F3rio; n=E3o ser=E1 publicado):
=3D\"text
> > > \" name=3D\"email\" size=3D\"64\" />
";
> > > print "Site:
>
> > >> ";
> > > (...)
> > > print "\n";
>
> > I'm not going to check that quote-escape festival just yet. Try to
> > validate the page it creates with the w3c HTML validator, most likely yo=
u
> > error will show up there.
>
> > If after that it still doesn't work/there are no errors, what form does
> > your code actually output, and how does your webserver log the request?
>
> The HTML validator goes fussy on some input tag it claims it's closed
> but not opened, when it clearily is. Here's the HTML output of the
> form:
>
>
> PbBlog/pages/comment.php" method=3D"POST">
>
> moderação caso:
> a) n=E3o contenha um nome de autor;
> b) contenha material impr=F3prio;
> c) seja, possivelmente, spam;
> Caso seu coment=E1rio n=E3o seja spam, mas=
sim um coment=E1rio leg=EDtimo,
> aguarde algumas horas e a justi=E7a ser=E1 feita. Obrigado pela
> paci=EAncia.
>
Email(obrigat=F3rio; n=E3o ser=E1 publicado):
"
>
> name=3D"email" size=3D"64" />
Site:
url"
> size=3D"64" />
> name=3D"content">
>
>
mg.br/~guedesav/PbBlog/img/captcha225896485.png" />
>
>
>
> value=3D"*908BE2B7EB7D7567F7FF98716850F59BA69AA9DB" />
>
>
>
>
> Besides, as I said, the form works finely in GET method, but not in
> POST. If it goes fine with GET, how come the problem is with the
> syntax?
Maybe I'm missing something here but where does this:
get closed? As far as I can see all your input fields are inside this
tag (in the code you posted.)
HINT: With the online validator you often need to read back a few
lines to find the real bug)