Why aren't you using cookies like a 'remember me' option?
If your DB is on website A, then you could spoof the login form on website B (change the text/password fields for hidden inputs with your username and password details - you have to ensure that name/id values are the same in both forms). **Check the site B source code for names/ids and any hidden inputs**. If you want to use a link as opposed to a submit button on website A. Change the submit button to a hidden field as well, keeping the name/id values. Then use a link with a javascript 'onclick' causing a 'submit' event.
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.
diafol
Keep Smiling
10,666 posts since Oct 2006
Reputation Points: 1,628
Solved Threads: 1,514
Skill Endorsements: 57