Solved

hidden value

Posted on 2000-03-27
2
179 Views
Last Modified: 2010-03-05
i have a script that submits values to itself but when
i try to add the hidden value here...  

       print start_form,
                              "Enter a number greater than 0  ",textfield('searc
h_string'),p,
hidden(-name=>'username',-value=>'$username'),
                              submit,

                              end_form;


and print it out with

$myCGI = new CGI;
$username = $myCGI->param('username');
print "username via param is $username<br>";
$username="$ENV{REMOTE_USER}";
print "username via remote user is $username<br>";  

i get
username via param is
username via remote user is boofulls
on the first page
and
username via param is $username
username via remote user is
after i hit submit

where am i going wrong?
all i want it to do i display the hidden value that i pass!

                                               
0
Comment
Question by:boofulls
2 Comments
 
LVL 4

Accepted Solution

by:
binkzz earned 50 total points
ID: 2660331
For starters you have $username within single quotes, which means the system will take it literally. Try putting the $username within double quotes ("$username")

Tom
0
 

Author Comment

by:boofulls
ID: 2660374
that was it
thanks
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now