sinanata Posted November 20, 2006 Share Posted November 20, 2006 hi folks, I'm the designer of tarmhost.com using whmcs and I made a small code snippet. If you are using whmcs like me. And want to have the announcements on your html site (outside of whmcs) you can use this small code and style it however you wany. Peace! <?php $baglan = mysql_connect("yourhost/generaly localhost","your db user","users pass")||die("Mysql connection error"); @mysql_select_db("your db name")||die("mysql connection error"); $tablo="SELECT * FROM tblannouncements"; $a=mysql_query($tablo); $maxeksibes=mysql_num_rows($a); $sonuc = mysql_query(" SELECT * FROM `tblannouncements` ORDER BY `tblannouncements` . `date` DESC LIMIT 0, 5 "); while ($satir = mysql_fetch_row($sonuc)) { if ( $satir[4]==on ) echo ' <h1 class="news_heading">'.$satir[2].'</h1> <p class="news_front">'.$satir[3].' /http://www.tarmhost.com/base/announcements.php"] devamı >> </p> '; } ?> 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted November 20, 2006 Share Posted November 20, 2006 thanks, but i think this is like the 5 example of how to do this. =P 0 Quote Link to comment Share on other sites More sharing options...
sinanata Posted November 20, 2006 Author Share Posted November 20, 2006 no problem I just wanted to help. The moderator can delete if he want. 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted November 20, 2006 Share Posted November 20, 2006 btw, very nice job on that tarmhost.com, i really like the design. 0 Quote Link to comment Share on other sites More sharing options...
Adds Posted June 18, 2012 Share Posted June 18, 2012 Thanks for the code, but do I have to add any information to this or is it just a simple copy and paste code, how does it get the information from my WHMCS site? Thanks, Adam. hi folks, I'm the designer of tarmhost.com using whmcs and I made a small code snippet. If you are using whmcs like me. And want to have the announcements on your html site (outside of whmcs) you can use this small code and style it however you wany. Peace! <?php $baglan = mysql_connect("yourhost/generaly localhost","your db user","users pass")||die("Mysql connection error"); @mysql_select_db("your db name")||die("mysql connection error"); $tablo="SELECT * FROM tblannouncements"; $a=mysql_query($tablo); $maxeksibes=mysql_num_rows($a); $sonuc = mysql_query(" SELECT * FROM `tblannouncements` ORDER BY `tblannouncements` . `date` DESC LIMIT 0, 5 "); while ($satir = mysql_fetch_row($sonuc)) { if ( $satir[4]==on ) echo ' <h1 class="news_heading">'.$satir[2].'</h1> <p class="news_front">'.$satir[3].' /http://www.tarmhost.com/base/announcements.php"] devamı >> </p> '; } ?> 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.