Results 1 to 3 of 3

Thread: how to store value of a text box in a perl variable

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2001
    Posts
    37

    Unhappy how to store value of a text box in a perl variable

    I am a beginner in Perl. Can anyone show me a few lines of sample code on how to store the value of a text box in a perl variable? I want to store the value the user entered in a form in a Perl variable after he clicks on the submit button (assuming my page submits to a perl script).

    Any help will be appreciated! Thanks!

  2. #2
    scoutt
    Guest
    ok if you are using a form with a text box then the value you give it will be the perl variable.

    <input type=text name=person value="">

    now see the name=person well that is the variable you need for perl. after the user hits the submit button then on the next page is looks like this-

    print "$person\n";

    that will print the text that the user inserted.

    if you use hidden variable then it woul dlook like this

    <input type=hidden name=person value="john">

    print "$person\n";

    that line will print out john

    does that help you? if not ask away

  3. #3
    New Member
    Join Date
    May 2011
    Posts
    1

    Re: how to store value of a text box in a perl variable

    I am beginner in Perl..
    I need to add a view button which takes the input from the text box which the user enters for eg:

    <input type=text name=person value="">

    print "$person";

    but the value is blank even if I enter something in the text box.

    Can someone please guide me regarding this..

Posting Permissions

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



Click Here to Expand Forum to Full Width