Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Using cpanel print x in perl script

Discussion in 'General Discussion' started by dgbaker, Oct 23, 2002.

  1. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,574
    Likes Received:
    3
    Trophy Points:
    343
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    I appologize if this sounds a little dumb.

    I have a perl/cgi that is used for users to create webpages from templates. I want to pre-populate the form with user info like username, domain etc..

    The problem is this:

    print &&input type=text size=40 name=\&usrname\& value=\&$usrname\&&&br&&br&\n&;

    I need to change the value= portion to something like,

    print &&input type=text size=40 name=\&usrname\& value=&cpanel print=&$user&&&br&&br&\n&;

    But I cannot get this to work, the value ends up being &&cpanel&
    and nothing else. The script is in the 3rdparty area on :2082

    Any help is mucho appreciated.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #1 dgbaker, Oct 23, 2002
    Last edited: Apr 11, 2003
  2. Juanra

    Juanra Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    777
    Likes Received:
    0
    Trophy Points:
    316
    Location:
    Spain
    You can try to get some values from the ENV hash:
    $ENV{'REMOTE_USER'} etc.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,574
    Likes Received:
    3
    Trophy Points:
    343
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Thanks Juanra, that does help quite a bit. I can now pre-populate a lot of the info. I'm hoping to be able to have this fully integrated for my users.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice