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.

How do i run php code that i made on cpanel branding index.html file?

Discussion in 'cPanel Developers' started by littohouston, Jan 5, 2010.

  1. littohouston

    littohouston Member

    Joined:
    Jan 3, 2010
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    hello i made a php script and was wondering how i could run the following on the interface of cpanel what it does is it check to see if the domain name exists in my whmcs if so then displays links if not then the account is not owned by me and must be owned by a reseller and will not show!

    <?PHP
    $whmcsconnect = mysql_connect("localhost","fruity_root","kaydenhill_1992") or die(mysql_error());

    if ($whmcsconnect)
    {
    mysql_select_db("fruity_billing",$whmcsconnect) or die(mysql_error());
    $whmcsquery = "SELECT * COUNT(domain) FROM tblhosting WHERE domain='ryantest.fruitywebhost.com'";

    $whmcsresult = mysql_query($whmcsquery) or die(mysql_error());

    if (mysql_affected_rows()==1)
    {

    ?>
    <cpanel Branding="include(whmcsgold_cpanel.html)">
    <?PHP
    }
    }
    ?>



    How do i get this to run?
     
  2. littohouston

    littohouston Member

    Joined:
    Jan 3, 2010
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
  3. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
  4. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Rename index.html to index.php, it should execute. If it isn't redirecting to index.php properly, please let me know here (PM will suffice), then do a redirect in teh index.html file.
     
  5. littohouston

    littohouston Member

    Joined:
    Jan 3, 2010
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Sorry this method is not working. is thier any other way i can do it, the php code is only an if or else statement.
     
Loading...

Share This Page