Hi,
I have two PHP files. The first PHP file, goes through a mysql DB and gets a list of all the records. It then opens up a javascript frame where it runs the second php file.
In this frame, the second php file is called over and over in a loop until there is no more records to process.
Now, the job of the 2nd file is to output data from the DB to files on the server. So it opens up an FTP Session if its the first record and attempts to close the FTP session on the last record.
This is all fine. The problem :mad:, is that after the second php file has finished (remember, the first time it is run it opens an FTP session with ftp_connect etc) the $conn_id variable is 'lost'. So when the second php file is called again, the FTP resource has gone.
So my question, is how do I get this $conn_id (FTP resource) stored, ready for when the second php file is initiated again?
In simple terms page2.php at the end needs to do "store $conn_id resource", and at the beginning needs to do "fetch $conn_id resource". But I have no idea how to go about this in PHP code.
Any help would be really really appreciated. I am fairly new to PHP programming and even newer to forums, so I hope this message is constructed in a proper manner 🙂.
Many Thanks in advance, Mark