View Single Post
Old 13.05.2004, 16:00   #2 (permalink)
njcallen
Baby Mamber
 
Join Date: Apr 2004
Posts: 16
njcallen is on a distinguished road
Default Re: use session user and password in url (php noob)

Hi Peter,

There are a few ways you can do this...

PHP Code:

<?php

$link 
'http://atmail.nl/atmail.pl?username=' $my->username '&password=' $pass '&pop3host=' $mosConfig_sitename .'&LoginType=xp&Language=english';

//or

$link "http://atmail.nl/atmail.pl?username=$my->username&password=$pass&pop3host=$mosConfig_sitename&LoginType=xp&Language=english";

//or

?>

<a href="http://atmail.nl/atmail.pl?username=<?php echo $my->username?>&password=<?php echo $pass?>&pop3host=<?php echo $mosConfig_sitename?>&LoginType=xp&Language=english">Link</a>
My only question is as to where the variable $pass is coming from. Are you pulling this straight out of the database because I don't think you can use the session table. I don't know that for a fact, but I'm sure I came across that when I was testing something similar.

Just as a note, I'm hesistant to send such information in the clear (plaintext) to another website. Although the password stored within mambo database is just an md5 hash of the user's password, it is still a potential security hazard.
It look's as if you maybe attempting to send across a plaintext password though, which is even more hazardous to place in a query string. Just a few thoughts!

Cheers,

Nathan
njcallen is offline   Reply With Quote