Show website template data from you MySQL database and images from your local server


Work Freelance!

Find more freelance jobs

Showing random template data from a MySQL database

This example show some random website templates based on some selected templates stored in the database. The thumbnail location is local and the template preview data is on a remote location.


Warning: mysql_connect() [function.mysql-connect]: Host 'web99.webfaction.com' is not allowed to connect to this MySQL server in /home/finalwebsites/webapps/finalwebsites_com/demos/templatemonster_data_via_mysql.php on line 90

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/finalwebsites/webapps/finalwebsites_com/demos/templatemonster_data_via_mysql.php on line 91

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/finalwebsites/webapps/finalwebsites_com/demos/templatemonster_data_via_mysql.php on line 94

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/finalwebsites/webapps/finalwebsites_com/demos/templatemonster_data_via_mysql.php on line 95

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/finalwebsites/webapps/finalwebsites_com/demos/templatemonster_data_via_mysql.php on line 113

The script's execution time was 0.2424 seconds...

Refresh this page! (to notice the random effect)

Related PHP functions:

mysql_fetch_object | mysql_query | array_rand | substr | strpos

Click here for the PHP script: TemplateMonster XML API Script