The param(data) was used previously in another link and here i am interested in uploading data2 (this works fine). However, the form submited should call a different script dependent on the $filename. if $filename was data then the link would for example www.processdata1.com if $filename was data2 then link would be www.processdata2.com.$upload_dir = "/home/upload"; $query = new CGI; $filename = $query->param("data"); $filename = $query->param("data2"); $filename =~ s/.*[\/\\](.*)/$1/; $upload_filehandle = $query->upload("data"); $upload_filehandle = $query->upload("data2"); #read and upload the file open UPLOADFILE, ">$upload_dir/$filename"; etc
rather than having to separate forms how can i achieve this? Thanks<FORM ACTION="http://www.xxx" METHOD="post" ENCTYPE="multipart/form-data"> File to upload: <INPUT TYPE="file" NAME="data2"> <INPUT TYPE="submit" NAME="Submit" VALUE="Upload"> </FORM>
In reply to form cgi by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |