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.

PHP Skin Development

Discussion in 'User Experience' started by stoo2000, Jan 3, 2004.

  1. stoo2000

    stoo2000 Active Member

    Joined:
    Jul 26, 2003
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Leicestershire, UK
    cPanel Access Level:
    Root Administrator
    im using,

    <? $user = <cpanel print="$user">; ?>

    this works on a page by itself but on a page with all the other mysql connections etc it just gives a parse error:

    Parse error: parse error in /*******/header.php on line 1

    Any help would be greatly appreciated

    thanks

    cPanel.net Support Ticket Number: im having trouble trying to get a cpanel var to php
     
  2. stoo2000

    stoo2000 Active Member

    Joined:
    Jul 26, 2003
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Leicestershire, UK
    cPanel Access Level:
    Root Administrator
    Also i have just noticed that cpanel is not parsing cpanel tags at all. the normal control panels are working fine, its just this section im building it doesnt :S maybe it has some problem with mysql ?? ? or something.

    This is what it shows when viewing source :
    <tr>
    <td height="32" bgcolor="#666666"><table width="100%" height="32" border="0" cellpadding="0" cellspacing="0" background="../images/header/navbg.jpg">
    <tr>
    <td>Welcome <cpanel print="$user"></td>
    <td>&nbsp;</td>
    </tr>

    Thanks
     
  3. kosmo

    kosmo Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    403
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    All over Europe
    Files incuded using php-include will not be parsed by cpanel. You must include them using the cpanel-include command.

    kosmo
     
  4. t c

    t c Active Member

    Joined:
    Aug 4, 2003
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    VA
    Change that php line to...

    Code:
    <? $user = '<cpanel print="$user">; ?>
    I recommend changing your own variable to something different as it's already used in cpanel.
     
  5. stoo2000

    stoo2000 Active Member

    Joined:
    Jul 26, 2003
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Leicestershire, UK
    cPanel Access Level:
    Root Administrator
    after speaking to kosmos, i found my solution, it was that i was using php-includes

    but now it works fine :D

    thanks
     
Loading...

Share This Page