|
إنضمامك إلي منتديات استراحات زايد يحقق لك معرفة كل ماهو جديد في عالم الانترنت ...
انضم الينا
#1
| ||
| ||
Hey -- I've been using the generic Photopost random image PHP code to generate a random image from my gallery for my CMS. In the process of moving to vB4's CMS, I've found that I can't run it. The code looks like this: Code: $host = 'localhost'; $dbUser = 'redacted'; $dbPass = 'redacted'; $db = 'redacted'; mysql_connect("$host", "$dbUser", "$dbPass") or die(mysql_error()); mysql_select_db("$db") or die(mysql_error()); $result = mysql_query("SELECT id,cat,bigimage FROM pp_photos order by rand() LIMIT 1" ) or die(mysql_error()); while($row = mysql_fetch_array( $result )) { print " <img src=\"http://gallery.njpinebarrens.com/data/" . $row['cat'] . "/thumbs/" . $row['bigimage'] .br /"\"> ";} When I run this in a PHP Widget, I get my random image, but at the very top center of the screen and not in the box. I am assuming this is something simple - please forgive my lack of understanding on how this widget works. __DEFINE_LIKE_SHARE__ |
مواقع النشر (المفضلة) |
| |