Find the answer to your Linux question:
Results 1 to 3 of 3
I'm trying to write a simple web script that takes a user name using an input box with CGI or Perl and passes that value as a parameter to a ...
  1. #1
    Just Joined!
    Join Date
    Apr 2009
    Posts
    2

    Simple Web Script

    I'm trying to write a simple web script that takes a user name using an input box with CGI or Perl and passes that value as a parameter to a script I have on my Linux server.

    E.g. User enters mike under user name input web field
    on server1 which should execute the following:

    root@server1:# /usr/local/bin/remove_user.pl mike

    Are there any examples I could use? I have never used a web interface to take a parameter for a script. Thanks in advance!

  2. #2
    Just Joined!
    Join Date
    Sep 2007
    Location
    Lafayette, IN
    Posts
    83
    If you write your CGI in Perl, you can use the CGI.pm module: The Fool's Guide to CGI.pm, the Perl module for CGI scripting

    This makes grabbing the form values much simpler.

  3. #3
    Just Joined!
    Join Date
    Apr 2009
    Posts
    2
    That worked. I was able to write a small script using CGI.pm. Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...