# Need to submit a loging form via the url bar --uses validation

**URL:** <https://forum.kirupa.com/t/need-to-submit-a-loging-form-via-the-url-bar-uses-validation/261557>\
**Category:** web dev\
**Created:** [May 28, 2008, 8:58pm UTC](https://forum.kirupa.com/t/need-to-submit-a-loging-form-via-the-url-bar-uses-validation/261557 "2008-05-28T20:58:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr\_Chulito](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@Mr\_Chulito](https://forum.kirupa.com/u/Mr_Chulito)\
**Post date:** [May 28, 2008, 8:58pm UTC](https://forum.kirupa.com/t/need-to-submit-a-loging-form-via-the-url-bar-uses-validation/261557/1 "2008-05-28T20:58:34Z")

</div>

Greetings,

I’m trying to send the logging values to a login page via the url bar, for example the address is [http://somedomain.com/login.asp](http://somedomain.com/login.asp), this form has a user name field and a password field with a submit button, I want to tell this page the values to place in those fields and then to submit the form, I know that I can tell it the values as ?userid=value1&password=&value2 but I don’t know how to tell it to submit it, this page uses a validation script that can only be called by submitting the form it self.

Thank you guys/gals for any help you can provide me with

---

<div class="post-metadata">

**Author:** ![kdd](https://avatars.discourse-cdn.com/v4/letter/k/ecb155/32.png) [@kdd](https://forum.kirupa.com/u/kdd)\
**Post date:** [May 29, 2008, 12:05am UTC](https://forum.kirupa.com/t/need-to-submit-a-loging-form-via-the-url-bar-uses-validation/261557/2 "2008-05-29T00:05:43Z")

</div>

instead of using “post” as submit form method, use “get”.

---

<div class="post-metadata">

**Author:** ![Mr\_Chulito](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@Mr\_Chulito](https://forum.kirupa.com/u/Mr_Chulito)\
**Post date:** [May 29, 2008, 1:41am UTC](https://forum.kirupa.com/t/need-to-submit-a-loging-form-via-the-url-bar-uses-validation/261557/3 "2008-05-29T01:41:06Z")

</div>

> [@kdd;2332707](#):
>
> instead of using “post” as submit form method, use “get”.

how would the syntax look on the url bar? [somedomain.com](http://somedomain.com/login.asp?get)…

---

<div class="post-metadata">

**Author:** ![djheru](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/djheru/32/3190_2.png) [@djheru](https://forum.kirupa.com/u/djheru)\
**Post date:** [May 29, 2008, 3:04am UTC](https://forum.kirupa.com/t/need-to-submit-a-loging-form-via-the-url-bar-uses-validation/261557/4 "2008-05-29T03:04:51Z")

</div>

```php

<form method="GET" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
<input type="text" name="uname" value="<?php if(isset($_GET['uname'])) { echo $_GET['uname']; } ?>" />
<input type="text" name="pass" value="<?php if(isset($_GET['pass'])) { echo $_GET['pass']; } ?>" />
</form>

```

Then if you have a url like

```auto
http://www.you.com/index.php?uname=WhatYouWant&pass=WhatYouAlsoWant

```

the form fields will automatically be filled in.

You could also do the same thing using $\_SESSION variables, and then you would have a lot more security and flexibility.

---

<div class="post-metadata">

**Author:** ![kdd](https://avatars.discourse-cdn.com/v4/letter/k/ecb155/32.png) [@kdd](https://forum.kirupa.com/u/kdd)\
**Post date:** [May 29, 2008, 3:24am UTC](https://forum.kirupa.com/t/need-to-submit-a-loging-form-via-the-url-bar-uses-validation/261557/5 "2008-05-29T03:24:13Z")

</div>

Sorry, I wasn’t precise…

What djheru said will work. 🙂

---

<div class="post-metadata">

**Author:** ![Mr\_Chulito](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@Mr\_Chulito](https://forum.kirupa.com/u/Mr_Chulito)\
**Post date:** [May 29, 2008, 3:38am UTC](https://forum.kirupa.com/t/need-to-submit-a-loging-form-via-the-url-bar-uses-validation/261557/6 "2008-05-29T03:38:34Z")

</div>

Sorry, I think I missed explained. let me give you my situation.

I my work consists of using lots of different programs to support my company’s products, the issue is that all those programs are password protect. I have the password for all of them how ever, I was trying to use a small HTML page created by me that would allow me to fire up the program (webbase sites) and then tell the site my user id and password and have it log me in directly so I don’t have to be entering the password every time I open it (sessions time out on them in about 5 minutes)… I managed to program the links to half of those programs so that it logs me in right away by me passing the proper userid and password values, however the other half of the programs are not so straight forward when submitting the login information for authentication, the are calling javascript functions within the page to authenticate the login form, I believe it’s autogenerating a temp key for every session so I really need to do the submit via the website itself. any thoughts?.

I know this is a long explanation but I believe it’s needed… please help anyone

thank you all

---

<div class="post-metadata">

**Author:** ![djheru](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/djheru/32/3190_2.png) [@djheru](https://forum.kirupa.com/u/djheru)\
**Post date:** [May 29, 2008, 4:14am UTC](https://forum.kirupa.com/t/need-to-submit-a-loging-form-via-the-url-bar-uses-validation/261557/7 "2008-05-29T04:14:51Z")

</div>

If you are referring to web applications that you use where you have to log into their website in order to access what you need, you wont be able to pass the username and password values indirectly (without filling in the login form) unless the site is designed to allow it. I am suprised that you were able to successfully log in to so many of them by just entering your username and password into the query string. I’m no security expert, but that seems pretty risky.

---

<div class="post-metadata">

**Author:** ![Mr\_Chulito](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@Mr\_Chulito](https://forum.kirupa.com/u/Mr_Chulito)\
**Post date:** [May 29, 2008, 1:47pm UTC](https://forum.kirupa.com/t/need-to-submit-a-loging-form-via-the-url-bar-uses-validation/261557/8 "2008-05-29T13:47:35Z")

</div>

Well I actually did not just told it here is my user name and password, I actually sent the variables to the place the form itself would send it if I was to manually press the submit button, the other sites have internal validation that can not be bypassed.
