php with 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
angulati
Forum Newbie
Posts: 2
Joined: Mon Mar 21, 2011 2:21 pm

php with images

Post by angulati »

Hi

I am new to php and the forum :)
I want to write a php code that allows me to pick image urls from a flat file and change the source of an img element in the html on a button click.
Can anybody help me with the same?

Thanks
AG
fugix
Forum Contributor
Posts: 207
Joined: Fri Mar 18, 2011 8:01 pm

Re: php with images

Post by fugix »

you are using a form i assume?
angulati
Forum Newbie
Posts: 2
Joined: Mon Mar 21, 2011 2:21 pm

Re: php with images

Post by angulati »

yes
fugix
Forum Contributor
Posts: 207
Joined: Fri Mar 18, 2011 8:01 pm

Re: php with images

Post by fugix »

to grab details about an image file from a form...use the #_FILES[] function. you can grab the name, size, type, tmp_name etc. if you can then move the tmp_name to a directory of your choice
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: php with images

Post by Jonah Bron »

I don't really understand your question. What do you mean by "flat file"? You want to upload a text file and extract image urls from it?
Post Reply