Is there a way to call a script from a button but have the user stay on the same page? I'm calling a script that sends something to a printer FTP. There is very little feed back from my script on the second page but. If there is a way to echo it to the current page that would be optimal. There are only a few users to this app.
echo "<input type=\"button\" name=\"print\" value=\"Print current page\" onclick=\"document.location='print_test.php';\"/>";
}
This is all I need as feedback from the print_test.php page.
$upload = ftp_put($conn_id, $destination_file,$source_file, FTP_ASCII);
if(!upload) {
echo "FTP upload has failed!";
}else{
echo "uploaded $source_file to $ftp_server as $destination_file";
}
ftp_close($conn_id);