I have a script namely, abc.php3, it has a form and it'll do the verification checking on the form's field. If all the field data is correct, I'll ftp a file which consist of those fields' data to a server and then redirect to another page.
My problem is, if I don't do the ftp, it'll redirect successfully but if do the ftp, it'll not redirect but prompt me a message like "The document contained no data. Try again later, or contact the server's administrator"!
Has anyone come across with this problem before ?
By the way, I used system() function to run the ftp program.
Piece of code :
system("ncftpput -u xxx -p xxx ".$remoteftpip." /xxx/xxx $abc", $val);
if ($val == 0)
unlink($abc);
........
#Insert data into database
......
if($check && $check2)
{
header("Location: thanks.html");
exit;
}
else
{
print "Error!";
exit;
}
Thank you for helping.