what you want to do is this
Function SessionReg(){
session_register('ftpconn');
session_register('Currdir');
session_register('ftpserver');
session_register('ftpUser');
session_register('ftpPass');
global $ftpconn;
global $Currdir;
global $ftpserver;
global $ftpUser;
global $ftpPass;
$ftpserver = "www.mysite.com";
$ftpuser = "director";
$ftpPass = "blahblah";
}
that way you can set them to global, and session vars, not keep in mind that just like unix PHP is VERY case sensitive so Ftpserver is not the same as ftpserver. Yeah, I am doing something close to that, and herve figured out that you can set them out of the function.