Link to home
Start Free TrialLog in
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.
ASKER CERTIFIED SOLUTION
Avatar of Arty K
Arty K
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
http://perldoc.perl.org/CGI.html read here for more information.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kkbenj
kkbenj

ASKER

Thanks to you both.  VERY rusty, as you can tell.