|
-
Jul 3rd, 2001, 10:05 AM
#1
Thread Starter
Member
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!
-
Jul 3rd, 2001, 08:01 PM
#2
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
-
May 3rd, 2011, 02:31 AM
#3
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|