Thats one of the things that i had come across initially, but the way im thinking that i would like to go about it, i will need to echo output out first, if that makes sense. I may be going about this the completly wrong way but, i have a page for input that passes to the code below the credentials. What id like is to display a message if the credentials are incorrect otherwise call another script to carry out some other action. This is mainly so that i can have a "logged in page" which obviously the first page wont contain. Hope that makes sense!
$conn = @ftp_connect($ftpServer)
or die("<BR><center><font style='color:#9dacbe'>Couldn't connect to FTP server</font></center>");
$login = @ftp_login($conn, $ftpUser, $ftpPass)
or die("<BR><center><font style='color:#9dacbe'>Login credentials were rejected or incorrect.</font></center>");
$workingDir = ftp_pwd($conn);
// Redirect to go here..
//on successful login redirect to ftp.php so i can list files on FTP server
Am i going about this the wrong way, or is there something ive missed..??