jkletch Posted January 20, 2011 Share Posted January 20, 2011 My Site is making progress. Its built using ModX CMS with the WHMCS integration coming along. Wishing I could get WHMCS to use the theme from the main site, digging into that is next. Here's my hosting page: http://www.mulehill.com/hosting/ I was originally using the WHMCS java script to get the 'name', 'price', and 'description' from WHMCS as shown in the widget documentation on this site, however that data was not readable by the search engines: view source would simply show the java script, i.e., "<script type="text/javascript" language="javascript" src="services/widgets/productsinfo.php?pid=5&get=description"></script>" I am now using PHP to pull the data right from the DB and its working great. Here a sample of the code used to pull the basic description: <?php ini_set('display_errors',1); error_reporting(E_ALL); require '/usr/home/mulehill.com/html/services/configuration.php'; $link = mysql_connect($db_host,$db_username,$db_password); mysql_select_db($db_name); // Retrieve all the data from the "Products" table $result = mysql_query("SELECT * FROM tblproducts where id=5 LIMIT 0, 30 ") or die(mysql_error()); // store the record of the "Products" table into $row $row = mysql_fetch_array( $result ); // Print out the contents of the entry echo $row['description']; ?> 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.