Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In 'form action="?login"', what does the question mark mean? [duplicate]

Tags:

html

forms

action

Consider:

<form action="?login" method="post">     <button>Login with Google</button> </form>

I usually see the action refer to a PHP or HTML file, but the "?login" stumps me.

Background information:

This is buried within the example-google.php file from lightopenid framework. I've been staring at the OpenID code to use Google as a third-party OpenID provider for user login on my web site and the sample code all works.

I am trying to get a clearer picture of what the framework is doing when the user presses the login button. I know that we must be sending a bunch of arguments to Google on this button action, but the ?login doesn’t seem to point anywhere.

http://gitorious.org/lightopenid

like image 824
Richard Avatar asked Sep 03 '25 05:09

Richard


1 Answers

A question mark denotes the query string.

It will post to the current URL with a query string parameter of login. I am not sure how you are processing the request after you click submit (post the form), but usually it would have a value assigned to it as in login=value.

like image 118
Kieran Avatar answered Sep 05 '25 01:09

Kieran



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!