Regarding my previous question, which I think it wasnt a good question, although I got some responses. I still am trying to figure this out, I read so many pages online but none of them was to help full. what I want to happen is I have made a form, like the following:
<form id="login" name= "myForm" method="post" action="" onsubmit="return validateForm()">
<fieldset id="inputs">
<input name="uname" id="username" type="text" placeholder="Username" >
<input name="pass" id="password" type="password" placeholder="Password" >
</fieldset>
<fieldset id="actions">
<input type="submit" value="submit" onClick="Login(this.form);">
</fieldset>
what I want to happen is when a user comes to this page, that person is able to create a new account (sign up) by entering the information needed which in this case is only a userID and a password. and lets say he is signing up for google or yahoo o another host.
how Can I do that, using the given information.
If some one can tell me how I can use the same information (userID and pass) to log in to the website (the account is already exist), that would be also very nice because then I can go on on my own.
What you are doing is technically illegal unless you inform the user you are doing so, also doing this in JS/HTML is bad practice due to the security issues involved. (Sending passwords in plain text to other windows/frames)
If you are doing this for a legitimate reason, I suggest you use a language like Java or C# to build a webservice that you can pass a Username and hashed Password to
From this point you can use call official API’s that allow you to do this legitimately and securely.
This will also allow you to check if the user is valid etc really easily.
Although you are probably doing this for a legit reason, it is the basis of most phishing scams so I doubt anyone will give you example code in JS.
Additional to this, you won’t be able to achieve this through JS due to sites like Google/Yahoo/Hotmail etc all having CAPTCHA in place.