Page 1 of 1
Uploading and resizing an image - tutorial
Posted: Sun Nov 11, 2007 11:46 pm
by s4salman
i read tutorial
viewtopic.php?t=41743
can we add something to this script, so that original file name and its resize file name stores into mysql database.
Posted: Mon Nov 12, 2007 1:07 am
by s.dot
To save the path to the image filename, if you're saving it to the hard drive, use the second parameter of one of the image functions.. e.g. imagejpeg($im, '/path/to/file.jpg);
To have the image be named on the fly if you're not saving the image (such as someone right clicks on it and saves), you'll have to send the filename in the header().
Posted: Mon Nov 12, 2007 1:22 am
by Rovas
Of course, just replace thumbail.jpg with an variable that represents the name you what to give, and then add a different function that insert in the table of the database the image: is a simple script that is similar to a certain point with the script that you use when wanting to display some data from a database instead of SELECT command you use INSERT.
If you don' t know how to do this search this forum, net.
Posted: Mon Nov 12, 2007 2:34 am
by s4salman
[s]u[/s]
you mean i can store the values of
$filename
$thumb
to mysql database.am i right ?
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.
Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.