Page 1 of 1

php with images

Posted: Mon Mar 21, 2011 2:34 pm
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

Re: php with images

Posted: Mon Mar 21, 2011 2:49 pm
by fugix
you are using a form i assume?

Re: php with images

Posted: Mon Mar 21, 2011 3:02 pm
by angulati
yes

Re: php with images

Posted: Mon Mar 21, 2011 9:22 pm
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

Re: php with images

Posted: Mon Mar 21, 2011 9:45 pm
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?