bigup401 has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: keep get param from url even if page reload
by FreeBeerReekingMonk (Deacon) on Jan 24, 2019 at 23:15 UTC
    Ok, What I think is happening is that you click submit and that is a POST, and the reload is a GET.

    For POST requests, the param("id") function will return the parameters from the postdata, but any parameters specified via a query string in the URL is available from the url_param("id"). Maybe you have a FORM that also has the id, or defines it, and it's empty?

    For GET requests, when you reload the page, CGI parses the specified parameters and makes them available via the param() method.

    So try url_param("id")

      thanks, your idea has worked for me

      thanks