Display Pictures on the webpage

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
juan00982
Forum Newbie
Posts: 2
Joined: Tue Jan 18, 2005 2:19 pm

Display Pictures on the webpage

Post by juan00982 »

Hi,

I'm using php and mysql and I finally managed to upload my pictures to the webserver and saved the picture name on MySql. How can I print the pictures on the webpage :?: .

Your help will be greatly apreciated.

Thanks,

Juan
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

might want to search for "+force +download"

there are a lot of threads dealing with sending images via php.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

You'll need a bit more code than this, but I'm sure it'll point you in the right direction:

Code: Select all

<img src="<?php echo $imagefilename; ?>">
juan00982
Forum Newbie
Posts: 2
Joined: Tue Jan 18, 2005 2:19 pm

Post by juan00982 »

Thanks for the info.

I managed to print it to the webpage but now I want to resize the picture, I know there're alot of threads with this info, but none of them seems to work, at least the ones I found.

I want just a simple resize script.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

resizing is a whole seperate thing than displaying an image ;)

search through the forums for "imagecopyresampled" if you are using JPEG/truecolor files and GD2. Search for "imagecopyresized" if you are using GIF or other palettized images or an older version of GD.

To see which version of GD you have, look through the output of phpinfo()
Post Reply