Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 189
  • Last Modified:

hidden value

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
boofulls
Asked:
boofulls
1 Solution
 
binkzzCommented:
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
 
boofullsAuthor Commented:
that was it
thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now