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

littohouston

Member
Jan 3, 2010
9
0
51
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?
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,544
13
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter

MattDees

Well-Known Member
Apr 29, 2005
416
1
243
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.
 

littohouston

Member
Jan 3, 2010
9
0
51
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.