KevHopwood Posted September 3, 2013 Share Posted September 3, 2013 (edited) Hi all. I'm building a site (which you will be able to find here: http://www.xclo.mobi/xclo2) and have a list of categories on this site. Each category on that page is linked to an item In my Database. Which then displays more content once clicked. I have a separate database form within the same database called apps (instead of mobi). Inside this I have a list of apps available but some apps are for selected devices. For example some apps link to google play and can only be displayed on an android device as displaying these on another device (ios for example) can be seen as pointless. The same goes for displaying iPad apps on an iPhone and also on an android as these can be seen as pointless. The device is saved in my apps database under the field "device" and have one of these categories iPhone iPad or android, What I would like is to display a category on my index page along side my other ones which say "APP DOWNLOADS". And once clicked it only displays the relevant apps available just like my current promotions on my site. But I only want the link to appear if they are on one of these devices: iPod touch, iPhone, iPad mini, iPad, android as these are the only devices that I have content for at the moment. For example. If you are viewing on a blackberry or a windows 8 or even a Firefox phone then this category will not show up. Please can someone tell me how to do this? Thank you. My code for my index page is: <?PHP include_once('include/connection.php'); include_once('include/article.php'); $category = new category; $articles = $category->fetch_all(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Xclo.mobi</title> <link type="text/css" rel="stylesheet" href="other.css" /> <link rel="apple-touch-icon" href="homescreen.png" /> <link href="startup.png" rel="apple-touch-startup-image" /> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-34172259-1']); _gaq.push(['_setDomainName', 'xclo.co.uk']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </head> <body> <?php include_once('header.php'); ?> <div id="content"> <?php foreach ($articles as $article) { ?> <ul class="pageitem"><li class="button"> <a href="list.php?id=<?php echo $article['promo_cat']; ?>"> <input type="submit" name="Submit" value="<?php echo $article['promo_cat']; ?>"/> </a></li></ul> <?php } ?> </div> <br><center> <SCRIPT charset="utf-8" type="text/javascript" src="http://ws-eu.amazon-adsystem.com/widgets/q?rt=tf_sw&ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Fxclo-21%2F8002%2Fc2cd2f40-ca29-49bc-add9-6cf16307e855"> </SCRIPT> <NOSCRIPT><A HREF="http://ws-eu.amazon-adsystem.com/widgets/q?rt=tf_sw&ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Fxclo-21%2F8002%2Fc2cd2f40-ca29-49bc-add9-6cf16307e855&Operation=NoScript">Amazon.co.uk Widgets</A></NOSCRIPT></center> <?php include_once('footer.php'); ?> </body> </html> Please help. Thank you. Edited September 3, 2013 by KevHopwood Quote Link to comment https://forums.phpfreaks.com/topic/281825-displaying-accurate-results-for-mobile-devices/ Share on other sites More sharing options...
KevHopwood Posted September 4, 2013 Author Share Posted September 4, 2013 Has anyone got any ideas? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/281825-displaying-accurate-results-for-mobile-devices/#findComment-1448073 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.