chad qian wrote:
I run php/mysql under "godaddy.com".Now,I want to upload image to the
mysql database.Then I want retrieve the image from mysql and display the
image on the web page.I search from the website and get completely
lost.I get serveral sample code but nothing works.Can anyone give me
working socurce code?Thanks in advance.
chad
Did you do what Jake proposed on the 17th? It would be nice to know if you
want to understand what PHP & MySQL are doing and how the code works, or if
you just need some piece of software that works. If it is the latter, use
Google. If you want to know how things work, you better start reading a bit
and ask more specific questions. Especially, what you want to do with MySQL.
Honestly, a database table is IMHO the worst place to store an entire image. I
recommend storing a file path and before display making sure that the file
still exists (see file_exists() in PHP manual).
I am currently working on a system that will do what you are asking for, but I
am not done yet. I could give you my alpha code and a sample database, but
that is it for now. I do not have any install scripts, I do not have any
finished documentation, and I do not have the time to fill someone in and give
support.
I did a two second search on Google and found this
http://www.dynamicdrive.com/dynamicindex4/php-photoalbum.htm
That ought to do it.
Otherwise use this search URL
http://www.google.com/search?hl=en&q=mysql+php+picture+viewer&btnG=Google+Search
and go through the first twenty hits. If you can't find anything that is easy
enough, try Jeoren Wijering's Image Rotator at
http://www.jeroenwijering.com/?item=JW_Image_Rotator
That guy is awesome and I'd wish I had the money and influence to hire him
into a company I work for. In regards to visuals I haven't seen anything
better. He is always busy and while he does like to help people out, he just
doesn't have the time to hold everyone's hand. So don't bother ask him a
question like "How do I install this?". Jeroen created some very basic, but
sufficient documentation. Read it and spend some time trying things out.
Install a web server (I recommend to the apachefriends.org 's XAMMP, read
their documentation, too - again, a group of selfless young people who spend
their spare time for the greater good) on your PC and try things out locally.
Once you have a good understanding of what you want, what you don't want, and
how the basics of PHP and MySQL work make a decision and either go with that,
or come back here and ask questions other than "give me working source code".
OK, that is way more information than your inquiry deserved, but today is
Christmas, so what the heck.
David
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php