Page 1 of 1

php help please....

Posted: Sun Sep 02, 2007 2:54 am
by harshasks
hi...

I am using MYSQL server to upload images as longblob type.. when i am trying to retrive image on to HTML page, i am getting some garbage type.. Can any one help me in this regard??? Is there any function which converts blob type of data to my mymetype(jpg)????? ........[s]pls[/s] please help me.....

Thank you
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2. Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.
[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.

Posted: Sun Sep 02, 2007 3:09 am
by s.dot

Code: Select all

header('Content-type: image/jpeg');
imagejpeg($yourblob);
Ideally, you should store the images on your server, and use the database only to map the location of the image on your server.

Posted: Sun Sep 02, 2007 5:59 am
by volka
and please
Before Post Read: General Posting Guidelines wrote:7. Write a clear subject line, it'll help people deciding whether to look at your post or not - 'help, PHP noob' is probably going to be ignored by some.