Hi All, I'm completely new to CGI scripting and I'm running into a difficult issue. I'm passing in values via the URL (http://www.blah.com?name=mike)

I have this variable as a field...
my $name = param("name");

I also have boolean statements that will issue different sub-routines based on user input...

if(param('action') eq 'Yes') { &delete; #this will delete the value in "name" } elsif(param('action') eq "No') { &keep; #this will keep the value in "name" } else { &print_form; #this prints the initial screen }

The print_form basically asks the user "Do you want to delete 'name'?" and it has 2 submit buttons, yes and no. I can't seem to keep the value that I put in the URL for name after a button is clicked. Can anyone help? Thanks in advance!

In reply to Keeping Values Perl CGI by Sylense

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.