PDA

View Full Version : Passing Data from One Script to ANother


gilep
07-30-2008, 02:28 PM
Hello,
I am trying to set up a site to design calendars using my users pictures. In order to do that I have built a form that users can attach files to it and send it to my server (using form2mail CGI script attached below). It works well but only for small files. For large files (I need to upload up to 13 files, each can be up to 5 Mb) it crashes after an hour and no files are saved. My host replied to me that there is a timeout on the server that they do not wish to increase.
Since the script works well for a single large file, my idea is to call it several times, and each time ask it to handle and upload only a single file. however, I want my users to fill the form and insert the names of the files they want to upload only once. So after the script is called the first time by the form, I need a way to call another script again (automatically, without user's intervention) and to pass the file names collected by teh first script to it. Since the script ends with calling an html thank you page, I though of using this page to call teh second script using
<meta HTTP-EQUIV="REFRESH" content="0; url=http://gilep.netfirms.com/cgi-bin/gilepf2mcalendar.pl">
This command does teh job but again I have no idea how to pass teh information from one script to the other.
The file names are stored in my @file_upload_fields.
BTW, I have no programming experties what so ever.
Thanks for any help related to these issues.

Thanks,
Gil

gilep
07-30-2008, 02:31 PM
Hello,
I am trying to set up a site to design calendars using my users pictures. In order to do that I have built a form that users can attach files to it and send it to my server (using form2mail CGI script attached below). It works well but only for small files. For large files (I need to upload up to 13 files, each can be up to 5 Mb) it crashes after an hour and no files are saved. My host replied to me that there is a timeout on the server that they do not wish to increase.
Since the script works well for a single large file, my idea is to call it several times, and each time ask it to handle and upload only a single file. however, I want my users to fill the form and insert the names of the files they want to upload only once. So after the script is called the first time by the form, I need a way to call another script again (automatically, without user's intervention) and to pass the file names collected by teh first script to it. Since the script ends with calling an html thank you page, I though of using this page to call teh second script using
<meta HTTP-EQUIV="REFRESH" content="0; url=http://gilep.netfirms.com/cgi-bin/gilepf2mcalendar.pl">
This command does teh job but again I have no idea how to pass teh information from one script to the other.
The file names are stored in my @file_upload_fields.
BTW, I have no programming experties what so ever.
Thanks for any help related to these issues.
Here is the script:


Thanks,
Gil

rafiki
07-30-2008, 02:35 PM
This isn't a PHP question, the script is not written in PHP, but you would store a variable in a session. www.php.net/session
read the manual.

djm0219
07-30-2008, 02:45 PM
This thread really belongs over in the Perl/CGI forum not here.

derzok
07-30-2008, 04:58 PM
And when you post it in the Perl forum make sure to use code tags... Nobody wants to read a flat block of code.

Len Whistler
07-30-2008, 06:25 PM
BTW, I have no programming experties what so ever.


I recommend that you choose PHP for this script. PHP is very easy to learn and it's a lot more popular than Perl based on the number of PHP vs Perl/ CGI threads, 25,000:3,000.




-----------

KevinADC
07-30-2008, 07:04 PM
Your post is inappropriate:

Do not post or email any part of the this code in any format whatsoever

I am flagging it for removal.