The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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,578
    Likes Received:
    3
    Trophy Points:
    38
    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.
     
    #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:
    16
    Location:
    Spain
    You can try to get some values from the ENV hash:
    $ENV{'REMOTE_USER'} etc.
     
  3. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    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.
     
Loading...

Share This Page