W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > November 2011

[Bug 12561] Add the @action in the <form> so that there is a way to submit to the same page

From: <bugzilla@jessica.w3.org>
Date: Fri, 25 Nov 2011 06:25:20 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1RTpDs-0007PB-RR@jessica.w3.org>

--- Comment #34 from brunoais <brunoaiss@gmail.com> 2011-11-25 06:25:17 UTC ---
(In reply to comment #33)
> I don't see the problem here. Just use formaction="?". You're not supposed to
> POST to a URL with query parameters anyway, that doesn't make sense. The query
> arguments are the form data in GET form submissions, the HTTP request body is
> the form data in POST form submissions.

Actually, that does make sense in some context I have already encountered.
Also, I've been trying to find and I can't find anything in the spec that
states that you may not send GET data if method is POST.
This may work as an example (I need better ones. This1 I just made up):
In PHP, the $_REQUEST variable is there mostly for historical reasons. Most
programmers state that relying a lot on it is not a good idea. Your script uses
urls in this way:
if you use the "?" in the @action, it'll become(by the rules):
Now the script will have to have a way to send those 2 variables through POST.
For that, just use hidden inputs with that key (@name) value (@value)
association. Now if I want to use another GET variable (for any reason) I have
to update the HTML also (But that's just a detail). The problem is in the
server. If you want to do things right you'll need to check the $_GET and the
$_POST variables if you want to do things right just because the variables that
identify where is the page the user wants is usually inside the url. Just by
having, example, @action="", the browser would always reuse the whole url that
made the page to appear.
So if the url is:
the POST will go to:

if the url is:
the POST will go to:

if the url is:
the POST will go to (and the page will actually reload):

Does that make sense to you? Do you need a better example?

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Friday, 25 November 2011 06:25:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:02:08 UTC