View Full Version : Submitting Parameters via URL
03-03-2009, 05:20 PM
Okay, so I know how to pass in parameters to the URL for instance at http://oit.nyls.edu/digitalcommons I can use http://oit.nyls.edu/digitalcommons/index.php?uName=username&uPassword=password. But I am wondering in this case how do I get it to automatically submit those parameters via the URL. Like i want it to automatically login the user in based on their credentials without showing them that actual screen.
Any help would be appreciate as I have been stuck for a while.
03-03-2009, 06:28 PM
Do you mean not showing the credentials on the url?
If it is.....
You need to use POST and it will not show up in the url
<form method="post" action="action.php">
<!-- form content -->
<input type="text" name="username"/>
<input type="password" name="password"/>
<input type="submit" name="Login"/>
03-03-2009, 06:47 PM
Not exactly. I have it so that it throws the username and the password in the form. For instance if I type in http://oit.nyls.edu/digitalcommons/index.php?uName=username&uPassword=password it throws username under the field Username and password under the field "Password". it doesnt perform the action and submit the form.
03-03-2009, 06:50 PM
I just want it to submit the form automatically after I pass in the username and password from the URL
03-03-2009, 07:19 PM
Then you need to alter you're authentication handling to check for the existance of the cookies, validate them, and automatically log the user in. There is no way in PHP to force a submit from a browser.
03-03-2009, 10:51 PM
If you are a URL that you are creating with the username/password in it, why send it to the login form. You could simply send it to the form that the login sends its data to and have it read the data from the URL. This is not as secure because you are passing the password in the URL, but depending on what you are doing it may work.
You may just need to change our form proccessing so as not to check for a posted form, because it wont have been posted. You could instead check to see if both username and password have a value.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.