how can i autofill a username and password into a websiteB username nd password fields when i click a link present in websiteA.
The username and password vl b stord in a database. and when i click on the link referring to websiteB, present in websiteA , i shuld get automatically fill the usrname and password fields present in websiteB. can anybody giv idea how to write the script or code..
while you open yourself up to script kiddies/hacking, and highly NOT recommended that you do this....
when a user clicks the link, that should call a php script with GET parameters.
1 of the parameters should be a unique identifier.
That identifier should be stored in a table along with user names and passwords.
with SQL, select the username and password.
Set the values of the text and password boxes with the results returned from the database.
Why aren't you using cookies like a 'remember me' option?
As long as the website B login validation routine isn't checking your 'referer' details, you will be automatically logged into website B. If 'referer' is checked, there are ways around this by fiddling http requests (but that deserves a whole topic to itself).
I've used this before for connecting different websites BUT be aware that this is really unsafe - especially if website A isn't that secure - you'll probably need to beef up site A security.