I have a username and password for a external website. I want to have a link from my webste to log in to that site without giving username and password to my users. How can I achieve that. I tried lke this but failed. If any one can rectify this code I would be greatful. thanks

<form id="main-form" method="post" action="http://xxxxxxxxxx/journal/login.php" >

    <div class="login-container">
  <div class="error">    </div>
            <label for="userid"></label>
      <input  style=" visibility:hidden; " type="text" name="userid1" value="09-t-p-0276369"  size="14" tabindex="1" id="userid1"  />
      <label for="password"></label>
      <input type="password" name="password" value="530964314"  size="14" tabindex="2" id="password1" style=" visibility:hidden; " />
      <label for="Login">&nbsp;</label>
      <p align="center">
        <input type="submit" tabindex="6" name="Login" value="Goto Journal" class="standard-button">
      <p>&nbsp;      </p>
    <p><span class="style4">Note:</span> On the next page please select <span class="style2">Journalsfull text</span> checkbox and <span class="style2">Your Journals@Ovid</span></p>


Recommended Answers

All 5 Replies

Not all websites allow you to do that. What exactly happens in your case?

Wouldn't it be easier to use your browser's password manager?

I understand that. But I allow only for authorised users through my webste. It wont be available for unauthorised use.

Then again, what exactly happens? Any errors? Are you sure the external website allows the remote login?

The Problem is there must be somthing wrong with my code. username and password is not passing to the external website. There is no problem with the external website. That also mine.

If you control both apps you haven't any reason to mimic a login. You don't have any reason for SOAP ( this is a matter of SSO Single Sign On but when you are ready you will ask for it). If both ends are created by you then they have a way to communicate (e.g. PDO can access a remote DB if the IP of the server that wants to access it is set to remote privileges). Just create a really long accessKey save it in your DB , pass it through POST (better than GET) and in the other end read from the remote DB if this key exist , if it does give privileges and delete it. I am writing all those with the notion that the two apps aren't in the same server of course , if they are the solution is more than obvious.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.