in reply to Re: Re: perl cgi - refresh question
in thread perl cgi - refresh question

No, because the URL still stands:
http://localhost/cgi-bin/sample_report.pl?value=xyz.

the $check variable is used in the script to differentiate between viewing (which is what appears to be needed here) and editing.

If the idea is that the person can update by clicking the URL the $check can be included in the param() call and added by the user (who presumably is in the loop) to show that the file should be updated:

http://localhost/cgi-bin/sample_report.pl?value=xyz&check=1

Update:
(N.B. the &check=1 is added by the user, not received from the script, and, of course, one should think about adding a password for good measure...)
  • Comment on Re: Re: Re: perl cgi - refresh question

Replies are listed 'Best First'.
Re: Re: Re: Re: perl cgi - refresh question
by zby (Vicar) on Apr 15, 2003 at 12:46 UTC
    And after the user clicks http://localhost/cgi-bin/sample_report.pl?value=xyz&check=1 this url sticks in the browser location field and when there is a refresh the same url is again submited to the server. (If you submit it in POST it won't do any better)
      Very true zby. When I read the question it didn't seem to me that updating the textfield by clicking the link was desirable at all, which is why I made it dependent on the internal variable check. If it is desirable that the link is clicked once and once only then my solution is not the correct one and it would appear that yours takes that requirement in account.

      Update: I've just had another look at the original question and it still appears to me that submission of the data for editing via the URL is a mistake. This in no way diminishes the fact that zby's solution solves the problem if an update via the URL is required.