trying to make dynamic images

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
guycrossley
Forum Newbie
Posts: 9
Joined: Mon May 12, 2003 8:46 pm

trying to make dynamic images

Post by guycrossley »

hello all!

when i list usersnames from my database i would like to put thier picture next to them. Unfortunately, i cant seem to store images directly into my database (filetype 'image' is not supported in my mySQL database). Instead, i've been storing a directory string, eg. "images/icons/pic001.jpg"

How would i create the dynamic images next to each name?

--Guy
User avatar
AVATAr
Forum Regular
Posts: 524
Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:

Post by AVATAr »

you only have to create a dinamic tag for the imaga that you want to display, when you retreive the user data, you have to retreive the "string" of the picture and save it in a variable, for example $image and then

Code: Select all

<?php
echo '<img src="'.$image.'">';
?>
voila you displayed your image...
Post Reply