Mr George Posted February 27, 2010 Share Posted February 27, 2010 With limited usage promo codes, is there a way to call the number of remaining coupons from WHMCS and display it on a web page? 0 Quote Link to comment Share on other sites More sharing options...
m00 Posted February 27, 2010 Share Posted February 27, 2010 If the "web page" is on the same webspace as the WHMCS installation, you could try: <?php require("path/to/the/dbconnect.php"); // Path to WHMCS' dbconnect.php file $result = mysql_query("SELECT (maxuses - uses) AS amount FROM tblpromotions WHERE id='1';"); // Define the ID of the promotion $data = mysql_fetch_array($result); echo "There are ".$data['amount']." spots left... (or something)"; ?> 0 Quote Link to comment Share on other sites More sharing options...
Mr George Posted March 1, 2010 Author Share Posted March 1, 2010 Thanks - i'll give it a go... 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.