The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
i have a webpage that displays a players profile when his name is selected from a drop down menu, the profile info is retrieved from a Database table and displayed, i`d like to display the players picture as well, but not sure on how to do this.
At present i have the pics stored in a folder on the webserver called profilepics.
Could anyone help me with the code to select the correct picture from that folder when retieving the players profile from the database?
Or should i be storing the pic in the database? (if so even more help is needed.)
Any ideas or help would gr8.
Many thx in advance.
> Hi Tappet,
>
> Next time I'll actually read the question properly. I thought
> you were trying to create a combo box which displayed a members
> name and a photo in the list - it's this which I don't think can
> be done.
>
> Pleased you got sorted anyway.
>
> JTD
Lo JTD
Maybe your mis-understanding was due to my poor explaination, but no worries cos its all sorted now, plus ive also learnt that you can not create a combo box which displayed a members name and photo in a list.
So thx for your incorrect but interesting advice.
Have a good wkend.
Thx for spreading some light and also the advice.
Next time I'll actually read the question properly. I thought you were trying to create a combo box which displayed a members name and a photo in the list - it's this which I don't think can be done.
Pleased you got sorted anyway.
JTD
All the pictures display correctly when using HTML and i have the same address stored in the database, but when i change the HTML code to PHP it just displays the red cross with the alt txt,
HTML
<img src="/Images/playerpics/playersname.jpg" width="122" height="172" alt="/Images/playerpics/playersname.jpg(26kb)" />
which displays correctly
PHP
<img src="<? echo $pic; ?>.jpg" width="122" height="172" alt="<? echo $pic; ?>.jpg (26kb)">
which displays a grey box with
X
/Images/playerpics/lewispro.jpgNO WAY! I've just opened the web page that displays these profiles to double check the alt text in the above paragraph and there is no grey box & no ALT text, instead its displaying the correct photo. This simple piece of code has mashed my head to a frustrated pulp over the last 2 nights, then 2nite without even opening the file in my txt editor it runs correctly. I dont know why the same piece of code did not work y'day but does work today, but it has reminded me of a saying my granddad use to say; "Theres no such thing as a computer error, they only do what they are told to do." so i put my hands up and accept responsibilty for creating a problem where there was no problem, even though i can't see any differnce in the PHP code i originally posted to the code posted above.
Thx 2 all that have spared some time to offer help and next time i'll try to post a proper problem.
Keep safe and happy coding
Thx 4 ya posting and once again your fine advice. what at 1st seemed to be a simple task is proving to be quite a challenge. I too have found relevant examples & postings etc elsewhere and even tho these people post "thx for the help and claim the code works" it clearly doesn't.
As helpful as all your advice has been and im sure still will be in the future i think its about time i invested in some literature as im starting to think my trial and error, learn as i dabble method is to shallow for the depth ive fell into. And that reminds me, thx for the posting relating to my GAD prize, as a newbie to web design i very rarely view the winners list and if it wasn't for reading your posting i would of never know (or not until it was to late) that i had won a GAD.
Right im off to invest my winnings in a book full of code which im sure will be simply get more confussing and i'll get back to ya on how i solved this prob.
Many thx once again
and keep safe m8.
I hope someone can prove me wrong here, but I looked into doing exactly the same thing some time ago and came to the conclusion (after many hours of trawling sites that promise lots but deliver little) that you can't do it.
There are a few ways of emulating drop down list by the use of tables but, like you say, it doesn't give you a postable value.
I'll keep looking for a solution but I thought you'd appreciate not being alone in finding such a simple concept so difficult to execute.
JTD
ive still got the same prob which is, the picture does not display, im retrieving the address for the photo from the database and storing it in $pic then using the following code to display it....
<img src="<? echo $pic; ?>.jpg" width="122" height="172" alt="<? echo $pic; ?>.jpg (26kb)">
but it just displays the 'alt' which is show as the correct address.
ie. "http://www.domain.com/images/playersname.jpg( 26kb)"
anyone have any ideas where im going wrong?
Many thx in advance!
Thanks for the reply and 4 pointing me in the right direction.