tags:

views:

64

answers:

1

Hello,

I have a page on my http://localhost/user/profile.php. I want the users to add a link of their photo from the desktop. I donot want them to upload. and display the same.

The image is not displayed.

What exactly am I doing wrong here?

Thanks Jean

A: 

Hi Jean, how are you planning to store the path to the image, in MySQL or other?

You should be able to simply ask the user via a post/get method in a form, the file path using <input type="file" name="user_photo_path" id="user_photo_path" /> and then embed that variable in an image tag as:

<img src="<?=$userPhotoPath;?>" />

This should then display the image locally, but be mindful that if another user goes to this page to see that photo, it won't show as they are not on the same host.

Lee