![]() Suppliers of high quality fossils & minerals, and creators the finest, most beautiful hand crafted gemstone jewelry. home | contact us | about us | news | join our mailing list! | glossary | terms & conditions | links |
|
Menu view basket sign in / register Quick Search
11 Queen StreetBridlington YO15 2SF 01262-401164 ![]() secure payments made through PayPal
|
Links// LinkManager // view_links.htm // (c) 2005 Phil Parker, Lycosa Web Services Ltd. // written 21/06/2005 // last updated 21/06/2005 // connect to database $db_host = "localhost"; $db_client = "linkman"; $db_pass = "pu2z1eHq"; $db_name = "linkman_links"; if (!mysql_connect($db_host, $db_client, $db_pass)) die("Could not connect to database - please check ini.htm"); if (!mysql_select_db($db_name)) die("Could not select database $db_name - please check ini.htm"); // loop through categories $category_query = " SELECT category_id, title FROM categories ORDER BY title ASC"; $category_result = mysql_query($category_query); if (!$category_result || mysql_num_rows($category_result) < 1) { echo "No categories found in the database."; } else { while (list($catid, $cattitle) = mysql_fetch_array($category_result)) { // check for links in this category for this customer $link_query = " SELECT out_html FROM links WHERE category_id = $catid AND customer_id = $cid AND out_status = 'active' ORDER BY out_html"; $link_result = mysql_query($link_query); if (!$link_result || mysql_num_rows($link_result) < 1) {} // no links in this category for this customer else { // display category title and loop through links echo "$cattitle";
while (list($out_html) = mysql_fetch_array($link_result))
{
echo "$out_html |
| http://www.the-stone-shop.com esales software © 2004 Lycosa Web Services Ltd. www.lycosa.co.uk sitemap |