Page 1 of 1

Newbe Question_File input static value instead of file path?

Posted: Wed Jul 08, 2009 5:05 pm
by Architek
Hello,

I am having some troubles with something...

I have my script essentially working as I expect.... but the data that I am capturing from certain input items is not what I want to capture.

I have a file input instance and it uploads the file to a FTP server via an INCLUDE php page. on that php page I have little if statements using isset...

Code: Select all

 
contined........
if(isset($_GET["FILE1"])) $FILE1=$_GET["FILE1"];
if(isset($_GET["FILE2"])) $FILE2=$_GET["FILE2"];
if(isset($_GET["FILE3"])) $FILE3=$_GET["FILE3"];
 
//Begin FTP process
        if(isset($FILE1)) {
                $destination_file1 = "/WA_FOO/BAR/".$lendername."-WIRE-".$loannumber.".pdf";
                @ $upload1 = ftp_put($conn_id, $destination_file1, $FILE1, FTP_BINARY); 
                $FILE1 = "WIRE ";
                }
        if(isset($FILE2)) {
                $destination_file2 = "/WA_FOO/BAR/".$lendername."-APAY-".$loannumber.".pdf";
                @ $upload2 = ftp_put($conn_id, $destination_file2, $FILE2, FTP_BINARY);
                $FILE2 = "APAY ";
                }
        if(isset($FILE3)) {
                $destination_file3 = "/WA_FOO/BAR/".$lendername."-SEPT-".$loannumber.".pdf";
                @ $upload3 = ftp_put($conn_id, $destination_file3, $FILE3, FTP_BINARY);
                $FILE3 = "SEPT ";
                }
......continued
 
in the primary php scriptwhere I initiate the mssql logging I have a variable defining the string of variables so I can see the items in the list that the user selected for processing.

looks like this....

Code: Select all

 
//Build upload_type string for logging
@ $upload_type = "".$FILE1."".$FILE2."".$FILE3."......continued
 
pretty much what I want to capture is a static value that I have stored in the form on that input element as value="SOMETHING" or I have been trying to define a static value after the upload process as shown in the first code snippet.

have tried various differnent methods and the solution escapes me at this moment.

Any help would be appreciated.

also comments about how to restructure this setup would be great as well.

Re: Newbe Question_File input static value instead of file path?

Posted: Wed Jul 08, 2009 5:09 pm
by Architek
by the way... the first code snippet I thought would work but it seems to just push the the value from this line $FILE1 = "WIRE "; on all instances regardless if the user choose that input item to upload a file.

I have the same process working but its not using the input file element.

Re: Newbe Question_File input static value instead of file path?

Posted: Thu Jul 09, 2009 12:26 am
by Architek
Any help or direction on this would be appreciated.

Re: Newbe Question_File input static value instead of file path?

Posted: Thu Jul 09, 2009 10:54 am
by Architek
bump