|
Posted by william.clarke on 11/22/07 05:35
On Nov 20, 9:04 pm, bruno_guedesav <bruno_guede...@yahoo.com.br>
wrote:
> On 19 nov, 16:38, "Rik Wasmus" <luiheidsgoe...@hotmail.com> wrote:
>
>
>
> > On Mon, 19 Nov 2007 19:29:38 +0100, bruno_guedesav
>
> > <bruno_guede...@yahoo.com.br> wrote:
> > > 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";
>
> > 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 you
> > 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:
>
> <form name="postcomment" action="http://www.dcc.ufmg.br/~guedesav/
> PbBlog/pages/comment.php" method="POST">
> <p class="disclaimer">AVISO: seu comentário pode ser enviado para
> moderação caso:<br/>
> a) não contenha um nome de autor;<br/>
> b) contenha material impróprio;<br/>
> c) seja, possivelmente, spam;<br/>
> Caso seu comentário não seja spam, mas sim um comentário legítimo,
> aguarde algumas horas e a justiça será feita. Obrigado pela
> paciência.</p>Nome:<br/><input type="text" name="nome" size="64" /><br />Email(obrigatório; não será publicado):<br/><input type="text"
>
> name="email" size="64" /><br />Site:<br/><input type="text" name="url"
> size="64" /><br /><p>Comentário:<br /><textarea cols="56" rows="8"
> name="content"></textarea></p><input type="checkbox"
> name="notify">Notificar respostas a comentário</input><br/>
> <p class="captcha">Responda a esta simples pergunta:
> <img style="display: block; text-align: center" src="http://www.dcc.ufmg.br/~guedesav/PbBlog/img/captcha225896485.png" />
>
> <input type="text" name="captcha-answer" size="16" />
> <input type="hidden" name="captcha-key"
> value="*908BE2B7EB7D7567F7FF98716850F59BA69AA9DB" />
> </p>
> <br /><input type="submit" value="Enviar Comentário" />
> </form>
>
> 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:
<p class="captcha">Responda a esta simples pergunta:
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)
[Back to original message]
|