Hello all-
We are just getting ready to build our new site with WHMCS. As such, I am a complete novice to WHMCS. To make matters worse, I an not familiar with PHP either (I am familiar with db development, just not with PHP. I've spent the past hour searching the discussion list to no avail (I'm sure there would be a thread on this).
I've created a very basic page (to familiarize myself WHMCS). I know there is much missing and I'm sure there may be some security issues with what I've written (hint - I AM aware of these issues). Following some examples, I have three pages to this solution: clients/test1.php, clients/templates/test-template/test1a.tpl & clients/feeds/test1.php.
Here is the clients/feeds/test1.php page code:
$result = "SELECT id,name,type,description FROM tblproducts WHERE tblproducts.hidden = 0 ORDER BY tblproducts.order ASC";
$data = mysql_query($result);
while ($row = mysql_fetch_assoc($data)) {
$code .= '<li><a href="cart.php?gid='.$row['id'].'">'.$row['name'].' <br> '.$row["type"].'<br><br> </a></li>';
$newCode .= '<li><a href="cart.php?gid='.$row['id'].'">'.$row['name'].' <br> '.$row["description"].'<br><br> </a></li>';
}
echo "document.write('<br />Plan Details:<br /><br />');";
echo "document.write('".$code."');";
echo "document.write('<br /><hr /><br /><br /><hr />')";
/*
echo "document.write('".$newCode."');";
*/
This "somewhat" works as expected for me (except that it only displays 3 records - there are 15 records, 6 of them with a "hidden" field value of 0 ).
BUT as soon as I uncomment the last line:
echo "document.write('".$newCode."');";
The page breaks. I assume this is an encoding issue because of the HTML values in the table. Could someone please point me the right direction - I would really appreciate some help!
Thanks,
James