473,408 Members | 1,809 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

How do I display Multiple images??

49
I want to be able to display the same image a number of times, according to how is set by my database that drives the page.
I have database of top goal scorers, i know how to display a list of the top goal scorers from the database and how many goals they have scored, but against their name i want to repeat a football image the number of times they have scored and keep it dynamic to the database, is there any way of doing a repeating region but limted to the number thats in a field???? please help!
Oct 6 '06 #1
4 6321
Seith
16
I don't get it?

So you're using PHP to call on fields from a databse, then display them in a table, why don't you add another cell in your DB and call it img then call on <img src=" <?PHP for pulling info from DB?>" /> for each table row...
Oct 7 '06 #2
ronverdonk
4,258 Expert 4TB
You could make a table with 2 cells and put the photo in cell 1 and all the goals in cells 2 in (PHP) loop, as in the following example:
[PHP]<?php
// $goals = value extracted from database
?>
<table>
<tr><td><img src="photo.jpg"></td><td style="width:300px;">
<?php
for ($i=0; $i<$goals; $i++) {
echo '<img src="ball.gif">';
}
?>
'</td></tr>
[/PHP]

Ronald :cool:
Oct 7 '06 #3
Milkstr
49
Thanks for your reply. i can see what your saying about doing a loop. 1'm a novis at this tho, i'm using an access database and asp. could do with a more detailed explanaition if you can!
Oct 12 '06 #4
Milkstr
49
I don't get it?

So you're using PHP to call on fields from a databse, then display them in a table, why don't you add another cell in your DB and call it img then call on <img src=" <?PHP for pulling info from DB?>" /> for each table row...
I have a DB with the number of goals a player has scored, this will change each week, i want to display next to the number the same amount of footballs, i.e. if a player has scored 5 goals i want to display 5 footballs, if he then scores 2 more the next week, when i change the DB i want the images to reflect that and display 7 football images. So i just want a reapeating loop depending on the number in the DB
Please help!!!!
Oct 12 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Mathias | last post by:
Dear NG, I currently ty to switch from matlab to python/scipy but have a lot of trouble with images. What I need is a function for subsequently displaying a number of 2D-matrices as an image. I...
3
by: RAllsopp | last post by:
I have a client who would like to have several pictures associated with one system. I have read about storing only the pathname to save OLE overhead and have set-up a form for my client to...
12
by: Wadim Grasza | last post by:
I want to store and display (on a form or a report) multiple pictures per record in an access database. The pictures are not stored within the database. They are stored as files and the database...
5
by: david | last post by:
Can I use WriteFile methods? It seems that it does not work. For example, the following code only dispay one figure. Response.WriteFile("images/image002.jpg") Response.Write("<br><p>")...
2
by: Adam | last post by:
I have extensively searched for a solution. Below is my code that is contained in an aspx. When my browser hits this aspx, I just get the standard broken image picture. I know the data is the...
18
by: fishwick | last post by:
I haven't really done any css in quite a while, and am banging my head against the wall trying get the rudimentary layout together of a church website home page to display correctly - I don't want...
0
by: Linta | last post by:
Hi, Actually i want to display mutiple images using BinaryWrite method. I am able to store all the images in an object.My problem is that i couldnt display all that images in the browser. I am...
9
by: Confused but working on it | last post by:
Just wanted to say thanks for the posts helping me make ths work. Added a few comments and after the readdir used a pattern match to test for ..jpg, and seems to work fine on my test setup. Maybe I...
11
by: Jankie | last post by:
I need to dispaly a user's multiple images in one entry.Right now,say if a user uploads 3 images,three entries for the same id display to match 3 images. I only want 1 entry to display all of a...
3
by: Ian | last post by:
I have a form with a sub form, on the continues sub for I want to display some data along with a picture, on the On Current event I have the code: .Picture = Nz() is the name of the picture...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.