PDA

View Full Version : Image Displayed from Specific Database Table


RollaJedi
09-09-2011, 06:55 PM
I am a noob to all this stuff, please go easy on me.

I have a mysql database on vbulletin. Within that database, i have a table for a card collecting mod that my users play on my site. The image i provided is of this table within phpmyadmin. What i hope to accomplish is to be able to put a code into each member's signature that shows an icon of each card they have. The p_userid column represents each member's id number and the p_card column represents each card's id number.

So, for example, Joe Blow is member number 23 at my site. So, his p_userid is 23. He has six cards in his possession, and they are cards 4, 8, 15, 16, 23, and 42. So, these numbers would be in the p_card column.

So, what will happen if the code is in the signature of Joe Blow, is there will be six images, one representing card 4, one representing card 8, etc.

https://vborg.vbsupport.ru/
Can someone please, please just point me in the right direction on this? I've literally been trying for many months to get help with no luck.

Thank you for your time!

Lynne
09-09-2011, 09:45 PM
It sounds to me like you need someone to actually write the modification for you since you have posted no code here. I can tell you in the most basic of terms what to do, but you would need to code it.

- do a query of the table to get all card ids for the user
- in a while loop, spit out the html code for each image: <img src="$variable['p_card'].png" alt='' /> and put it all into a variable like $mycards
- preregister the variable $mycards for use in the template you want to use it in
- spit out the variable $mycards where you want it in the template

RollaJedi
10-03-2011, 04:17 PM
thank you for this info. how or where do you pre register the variable?

--------------- Added 1317662445 at 1317662445 ---------------

could i maybe hire your services for a small thing like this?