إنضمامك إلي منتديات استراحات زايد يحقق لك معرفة كل ماهو جديد في عالم الانترنت ...

انضم الينا
استراحات زايد الصفحة الرئيسية


 
 
LinkBack أدوات الموضوع انواع عرض الموضوع
  #1  
قديم 01-16-2010, 09:40 AM
عضو ماسي
بيانات محروم.كوم
 رقم العضوية : 503
 تاريخ التسجيل : Dec 2007
الجنس : female
علم الدوله :
 المشاركات : 2,100,670
عدد الـنقاط :3341
 تقييم المستوى : 2140

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__
رد مع اقتباس
 

مواقع النشر (المفضلة)


تعليمات المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك

BB code is متاحة
كود [IMG] متاحة
كود HTML معطلة
Trackbacks are متاحة
Pingbacks are متاحة
Refbacks are متاحة



الساعة الآن 02:05 PM


Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.5.2 TranZ By Almuhajir

RSS RSS 2.0 XML MAP HTML