View Single Post
Simple module need help to do it right
Old
  (#1 (permalink))
osward
Junior Member
 
Status: Offline
Posts: 5
Join Date: Jun 2003
Simple module need help to do it right - 07-17-2003, 01:10 AM

Hi everyone,

I am trying to build a simple module and collect the user info and pass on to other web program within my site and don't need user to login to the web program again. Here is what I did
Code:
<?php 

if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
	die ("You can't access this file directly...");
}
$module_name = basename(dirname(__FILE__));
$pagetitle = "$module_name";
$index = 1;
require_once("mainfile.php"); 
 if(is_user($user)){  
     $userinfo = getusrinfo($user);  
    
include("header.php");
OpenTable();
echo "<div align=\"center\"><font class=\"title\">Welcome $userinfo[username] to Member Upload</font></div>

";
echo "<a href=\"ftp://$userinfo[username]:$userinfo[user_password]@ftp.osward.net/\" target=\"_blank\">Access your personal folder directly here</a>


";
CloseTable();
include("footer.php");
}

?>
This works fine with basically what I want, but I want to know if I could skip this page and send the user directly to their user folder without have to click the link again in a seperate window.

That means when user click this link in the menu, the user will be sent to his folder without having to click the link again. I don't know how to do it, would someone please help me to achieve that.

Thanks in advance for the time

Regards,
   
Reply With Quote