Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Help with form action code

 
   Web Hosting and Web Master Forums (Home) -> Webmaster RSS
Next:  Hm, do you know :)  
Author Message
Michael

External


Since: Sep 27, 2007
Posts: 2



(Msg. 1) Posted: Thu Sep 27, 2007 11:54 am
Post subject: Help with form action code
Archived from groups: alt>www>webmaster (more info?)

Can anyone describe what the following form action code means:

<form action="?formsubmit=1" method="post">

I'm not familiar with the "?formsubmit=1" portion of the code. This is
contained in a website I will be inheriting. As the form in context
does not appear to work (it simply redisplays the form page without
any indication of success or failure). As I have found other instances
of incorrect or deprecated tag structures elsewhere in the website,
I'm not sure how much credence to give this syntax. At best I assume
some script name is intended to appear immediately before the question
mark with the following as a parameter. Is this analysis correct, or
am I unaware of something?

 >> Stay informed about: Help with form action code 
Back to top
Login to vote
spam19

External


Since: May 08, 2004
Posts: 952



(Msg. 2) Posted: Thu Sep 27, 2007 2:16 pm
Post subject: Re: Help with form action code [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

And lo, Michael didst speak in alt.www.webmaster:

> Can anyone describe what the following form action code means:
>
> <form action="?formsubmit=1" method="post">

The action attribute of the form describes the URI to which the form
contents will be submitted. In this case, the URI is a relative one which
begins with the query string. Essentially it means: "submit the form to
the current URI, but tack on '?formsubmit=1' to the end of it"

Thus if the URI of the form is www.example.com/form.php, then the form
will be submitted, via the POST method, to
www.example.com/form.php?formsubmit=1

This is a sneaky way of submitting both POST and GET variables at the same
time. In PHP, this means that the REQUEST_METHOD will be set to POST, but
the GET variable "formsubmit" will be set to 1.

> I'm not familiar with the "?formsubmit=1" portion of the code. This is
> contained in a website I will be inheriting. As the form in context
> does not appear to work (it simply redisplays the form page without
> any indication of success or failure).\

There is nothing wrong with the form code. It is likely the server-side
code which accepts the form input is not recognizing that the form has
been submitted.

> As I have found other instances
> of incorrect or deprecated tag structures elsewhere in the website,
> I'm not sure how much credence to give this syntax. At best I assume
> some script name is intended to appear immediately before the question
> mark with the following as a parameter. Is this analysis correct, or
> am I unaware of something?

It is nothing so complex. It is simply the query string end of a relative
URI.

Grey

--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollary that nothing is ridiculous.
- http://www.greywyvern.com/orca#search - Orca Search: Full-featured
spider and site-search engine

 >> Stay informed about: Help with form action code 
Back to top
Login to vote
Michael

External


Since: Sep 27, 2007
Posts: 2



(Msg. 3) Posted: Thu Sep 27, 2007 4:00 pm
Post subject: Re: Help with form action code [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Thu, 27 Sep 2007 14:16:04 -0400, GreyWyvern <spam.TakeThisOut@greywyvern.com>
wrote:

>And lo, Michael didst speak in alt.www.webmaster:
>
>> Can anyone describe what the following form action code means:
>>
>> <form action="?formsubmit=1" method="post">
>
>The action attribute of the form describes the URI to which the form
>contents will be submitted. In this case, the URI is a relative one which
>begins with the query string. Essentially it means: "submit the form to
>the current URI, but tack on '?formsubmit=1' to the end of it"
>
>Thus if the URI of the form is www.example.com/form.php, then the form
>will be submitted, via the POST method, to
>www.example.com/form.php?formsubmit=1
>
>This is a sneaky way of submitting both POST and GET variables at the same
>time. In PHP, this means that the REQUEST_METHOD will be set to POST, but
>the GET variable "formsubmit" will be set to 1.
>
>
>There is nothing wrong with the form code. It is likely the server-side
>code which accepts the form input is not recognizing that the form has
>been submitted.
>

.... (snip)

>
>It is nothing so complex. It is simply the query string end of a relative
>URI.
>
>Grey


Thanks for the succinct and prompt reply. Now I know why it was in a
..php file without a single instance of PHP code. I also think I know
why the previous webmaster is running away and I'm inheriting the
site. I guess he didn't know what the next step is Smile (Of course, as
of this morning, I didn't either.)

-- Michael
 >> Stay informed about: Help with form action code 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
New Browser Window from Form Action? - Hi, I am trying to add a PayPal shopping cart on my site. The following code is for the View Cart button. <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hi...

Posting back form using action="#" - Hiya, I'm working on a login form for one my sites... the login will appear on almost every page and when the user logs in, they won't be taken to a special page, instead they will see different options (where the login used to appear) To do the post..

Help .. course of action? - We recently set up a new account with a US host, and are having major problems with our UK host (internetters.co.uk). They are holding our domains to ransom, and will not repoint them to the new server due to an outstanding bill for exceeding bandwidth..

I need HELP in Action Script - Please, can anyone help me ? I have a central flash menu that leads to a html site with three frames. The top and the left ones must be fixed, while the text of the main one changes in accordance with the button of the flash menu I click on. In html, I...

Java Problem With IE "Action Canceled" - In internet explorer if you go to www.myfootballforum.com, you will see "hopefully" an advert in the top right hand corner. Well if you can your lucky as i can't all i ge is "Action Canceled" and i dunno why. Its a java problem and i'...
   Web Hosting and Web Master Forums (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]