Hi,
I experience a strange issue in my Perl CGI script where I'm not able to keep the value of a variable after button submit.
When I run the script, it displays the upload to Folder1 by default(it's a requirement). I can change to Folder2 by clicking on a hyperlink with variable var(name of folder)
<a href="script.pl?var=$var">
I use this command to retrieve this value:
$var=query->param('var');
The problem:
First: I click on the Folder2's hyperlink. Second: I load a file from C:. Third: I click on button Submit to upload file to Linux server.
Result: the script uploads the file in Folder1 instead Folder2 and displays the page of Folder1 instead Folder2.
When I try to debug the script I noticed that the value of var is restted to "" after clicking on button submit.
Is it a way to keep the previous value after button submit in Perl?
Thanks a lot for your suggestions.
I experience a strange issue in my Perl CGI script where I'm not able to keep the value of a variable after button submit.
When I run the script, it displays the upload to Folder1 by default(it's a requirement). I can change to Folder2 by clicking on a hyperlink with variable var(name of folder)
<a href="script.pl?var=$var">
I use this command to retrieve this value:
$var=query->param('var');
The problem:
First: I click on the Folder2's hyperlink. Second: I load a file from C:. Third: I click on button Submit to upload file to Linux server.
Result: the script uploads the file in Folder1 instead Folder2 and displays the page of Folder1 instead Folder2.
When I try to debug the script I noticed that the value of var is restted to "" after clicking on button submit.
Is it a way to keep the previous value after button submit in Perl?
Thanks a lot for your suggestions.