Avatar of kkbenj
kkbenj
 asked on

CGI pull variables from a form

It has been ages since I've done CGI Perl scripting.

My variable $UName is blank when this script is executed.  Why is not being picked up from the HTML form?
HTML:
--------------------------------------------------------------------------------------
....
</head>
<body class='d-s'>
        <form id='d-form'>
          <div class='section form'>
            <h1>Create your account</h1>
            <p>Creating an online account lets you easily update your information.</p>
            <p class='required'>
              All fields marked
              <em class='red'>*</em>
              are required
            </p>
            <h2>Create your username and password</h2>
            <fieldset>
              <ol>
                <li class='required-field' style='float: none;'>
                  <label>
                    Username
                    <em>*</em>
                  </label>
                  <input name='Wusername' type='text' />
                </li>
                <li class='required-field' style='float: none;'>
                  <label>
                    Password
                    <em>*</em>
                  </label>
                  <input id='password' name='Wpassword' type='password' />
                </li>
                <li class='required-field' style='float: none;'>
                  <label>
                    Confirm Password
                    <em>*</em>
                  </label>
                  <input id='confirmpassword' name='Wconfirmpassword' type='password' />
                </li>
              </ol>
            </fieldset>
          </div>
            <div class='submit'>
              <input class='pill-button' type='submit' url='/cgi/unamecheck.cgi' value='Start!' />
            </div>
        </form>
...
--------------------------------------------------------------------------------------
unamecheck.cgi:
...

my $UName=param('Wusername');
my $UPassword=param('Wpassword');
print "$UName - name<br>";

...
--------------------------------------------------------------------------------------

Thanks in advance for any help.
Scripting Languages

Avatar of undefined
Last Comment
kkbenj

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Arty K

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Arty K

http://perldoc.perl.org/CGI.html read here for more information.
SOLUTION
Dave Baldwin

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
kkbenj

ASKER
Thanks to you both.  VERY rusty, as you can tell.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes