Reviews of web pages ...

Change Colours

Reviews for http://www.wellho.net/solutions/php-example-php-form-image-upload-store-in-mysql-database-retreive.html

Jelle said Thanks for this script. However, I have a problem. The images don't seem to upload at all.. my database sais 0kb and they don't display after uploading. I sometimes get an error about these two lines: $instr = fopen("latest.img","rb"); $image = addslashes(fread($instr,filesize("latest.img"))); Everything else seems to work fine. I also have the mysql and php version required. A little help over here? Grtz PS I added the link to my website where I implemented the script.

Ushno said Very useful script. I found it very much hepful.

frustrated said worked to a point, it put the images in the db, but it did'nt display them as shown! Mor significantly though, ho do i retrieve the images to a web page..?? left holing the baby

Peter J said Thanx a lot! worked directly even for me as beginner in php, mysql. A suggestion is that you make it even more obviuos that the whole code should be in one page and not as in the first example..

Anon said Thanks a lot man. It works great. Just as soon as I can understand it all I will be off to the races.

David Kadison said This worked perfectly for me - I changed, the database user, passwoord and name and it worked without a tweak... Thank you so much

Daniel Diaz said The code is really good. After a while i figured out the error. Just substitute "gim" for "pid". Trust me it will work. That was the whole bug. Lucky I found out. The funny thing is that I am not a programmer, I am just learning to do websites... Buena suerte amigos...

Brijesh said WOW Script is very helpful

Mark said Hi.. I got it run fine. How can I call old image from the database??

Jem Smith said Hello I'm Jem Smith devloper in infoseeksoftwaresystems.com I'm unable to use this script.hwo can this make helpfule to me.

Graham said Dorit, thanks for your comments. This script is very much a demonstration of how the various PHP and MySQL and HTML form elements fit together. You (and anyone else) are welcome to add in your own validation in the form of passwording, [further] error checking, etc. The matter of user validation for uploaded images is a very serious one indeed; at first glance, it could look as if we are leaving ourselves wide open on this site to image postings without any form of moderation. However, as users are only shown the latest images the system is self-correcting in that is someone posts an image that they should not, it will soon disappear as others get added on following.

Dorit said Quite interesting script, but I would want a password option and the filesize limit does not work - larger files plus title are still uploaded to the database (with no error message), but the pictures won't be able to show since they post with a size under the limit. However they don't seem to be resized, only somehow broken. I testet the script test page here, and here also my picture title ended up being shown together with the next last uploaded picture, the latest picture which was under the size limit, excactly as I experience it with my own implementation, so it seems the problem is with the script, not my implementation of it.

Graham said Albert, the source code of the other page may be handy there ... the coding to do it should be straightforward if you know some SQL (and if you don't, a question and answer session really isn't the best way to learn - click on the suggested link instead. We have chosen NOT to display more than 3 on the other page for security reasons - allowing just 3 images to be seen on a fastmoving site means that it is selfmoderating - any nasty images soon get lost in the depths of time ;-)

Albert said Great script, I only have one question. Is it possible to view all the images in the database? Can you also explain how you get up to three images on the other page where you can search through the db?

Graham said Bastler, the limit is simply to stop people flooding our server although PHP does have an upload limit (much higher, configurable via the php.ini file)

Bastler said just what I needed, thanks! I have one question though: The filesize limit you implement in the script, is this a "must have"-mySQL-Hardlimit or do you just want to prevent people from flooding your Database with DVD-ISOs? In other words: if I use this script and limit access to it to trustworthy people, can I allow 5MB images or will it crash the database?

Alan Hamlyn said I've seen this script for download elsewhere, i think its a possiblity it was taken...

waqas said how to call images back for display.....!!!???

Larry said Really excellent example... thank you, Graham :o)

Runar said Just wanted to say thanks for a very helpful script.

Graham said Damu - I don't know which picture you saw. This page is open to anyone to test and, occasionally, unsuitable material gets posted. We do keep an eye on things, but because the page is so busy anything that's not suitable will only be seen for a few minutes before it's replaced by another image.

taifa said GREAT

damu said it's very super code but pls change the picture for ur example sit if it's having means cant able to open publicaly

Graham said Dallas, the "gim=1" on the end of the URL is passing a parameter in as if it was a form that had been completed - the variable will get st in the $_GET and $_REQUEST superglobals. Our "Rank and Review" system isn't best suited for technical questions such as this - we've an interactive forum at http://www.opentalk.org.uk where we can (and do) help people with questions on scripts such as this one.

Dallas said Hi, I just have one question... I'm not familiar with using your method of inserting the image data into the page: if ($_REQUEST[gim] == 1) { header("Content-type: image/jpeg"); print $bytes; exit (); } and img src=?gim=1 width=144 Do you have any references to using this method for inserting variables? Is there another way to insert the image without checking? Say if I want to print it in the page every time it loads? Thanks, D!

Anon said This was a great tutorial

Graham Ellis said Yes, Josh - there is a (very slight) chance of there being a problem with latest.img on a very high use site. The script is written as it is to keep it straightforward for most people / applications. On a very high use site ... (a) use a function such as uniqid to generate a unique file name for the temporary file, (b) put the temporary file into a directory that's away from the document room at web server writeable and (c) use the unlink function to delete the temporary file after you've written it to the database.

Josh said This is a great little script that I got successfully running with only a small amount of frustration. Only one question: Is there any chance that on a high traffic site, the latest.img file and database placement could display or store the wrong image?

XSwebbX said Excellent, this is a brilliant example and has pointed me in the right direction! Great one. I'm just going to make some scripts so users can upload pics on my own project/website.

Dejo said Svaka čast,odrađeno je super.And just one word on english PERFECT

Graham said Wow - this page is busy! I've just looked at the "stats" and it's had 274 hits in the last 24 hours. The database of images that I reset every couple of week has 900 images in it .... looks like it works for most people, even if it's failing for poor old 'Anon'

Graham said This script is dependant on you having PHP and MySQL available on your domain, and on you modifying the script to include your login details when you install in there. If it doesn't work for you, please read and check the list of pre-requisites and configurations carefully, and if that doesn't solve it for you please use our forum for help.

Anon said Aw gee, another non-working image uploader. 0 bytes in the image field. Gracias

Kerry said Brilliant! been trying to figure out how to upload images for ages! Massive thanks!!

Anonymous said Finally, a concise, bare-bones and easy to understand instruction on how to get an image into and out of a blob. Thank you!

Jesus said Excellent example, for somebody that is learning PHP and Mysql like me...this script has saved me a lot of time. I've been for a week working in how to save pictures in a Mysql database, and this program works great. I already modify the size of the pictures and is working fine.

Anon said Quick question on your coding. Im trying to make it add another value into another field in the PIX table.. ive been trying to code for many hours and just cant understand where it gets the information fromthe form into the database.. if you could just explain quickly.. thank you

Adam Best said Great script - I've been looking for ages for one that works like this. Is it possible to edit the script so I can upload PDF's? That would be the ultimate solution for me! Thanks for your help

tim0fee said Hiya & thanks for sharing this knowledge! Just found this tutorial - but I can't get the code to work on my local Apache/MySQL set up (even when I insert my correct login details for the database etc.) All I am doing is copy/pasting the above code into a new file (foo.php) and dropping it into my server root folder. All I get is a blank page returned! :( Any hints available please ? - I'd love to get it working

Jo said I would just like to say a big thank you for this code. I have been trying to add images to mysql for the last few days and this is the first one I have found that works! Thanks.

that's a total of 40 links to http://www.wellho.net/solutions/php-example-php-form-image-upload-store-in-mysql-database-retreive.html

Reviews for http://www.wellho.net/resources/php.html

Graham Ellis said Yes, this is a page on PHP so it doesn't say much about Javascript ;-). Actually, we specialise in server side languages so we don't heva much Javascript here and we're too thinly spread to add another quiz and do all that would go with that. But my suggested link will take you to a few other Javascript resources that we have!

shobha said I found their was no word on JavaScript;which is used for validation and also for client side process of work.pls do new link on javascript and also set a quiz on javascript

that's a total of 2 links to http://www.wellho.net/resources/php.html

Reviews for http://www.wellho.net/resources/M350.html

Graham said All our friends ask us how the "Well House Manor" project is going; I've started this section in our resources index to pull together all the posts on this topic, to one side from all the information that future customers will want to see.

that's a total of 1 links to http://www.wellho.net/resources/M350.html

Reviews for http://www.wellho.net/resources/locall.html

Graham said Should we use a geographic number, or a special number such as one that starts 0845 (locall) or 0870 (national rate) in our publicity / to get customers to call us? We've chosen to offer both the geographic number and the locall numbers to web site visitors from the UK so that they can select the rate that's best for them. We are NOT offering an 0870 number even though many businesses do so. Originally described as "National Rate" numbers with the intent that callers would pay the same as a long distance call within the UK, they're often more expensive to call now if you've got a BT discount package or if you're with another telephone company - accoring to the Daily Telegraph of yesterday, it costs an extra 36% on the BT OptionOne tarriff, for example. The other reason that we don't offer 0870 numbers is that they're like premium rate numbers in some ways - if you call them, part of the cost of your call is paid to the company you're calling. We have no wish to take part in a scheme where we would actually make money if have to put you on hold ....

that's a total of 1 links to http://www.wellho.net/resources/locall.html

Reviews for http://www.wellho.net/resources/access.html

Anon said Accessability is a very importand thing in webdesign, enough said.

that's a total of 1 links to http://www.wellho.net/resources/access.html

Reviews for http://www.wellho.net/quiz/phpquiz.html

David Lefkon said Nice .. very helpful!

Anon said This was a good quiz for me as a beginner

Anon said helouuuu, php is not a programing language, have u ever heard of server-side scripts?

viperxp45 said awsome

Graham said Yes - because I have no element preceeding the quoted regular expression on that particular question, the 2 or 3 letters could be preceeded by other letters as you state, thus making it "2 or more letters". Noted, question updated. Thanks for the inputs

Anon said This is true, the proper answer would be the one chosen. If the question stated [a-z]{2,3,}$ then the said correct answer would be the choice.

curtis said Thorough, well-planned PHP quizes! I found one question in the intermediate quiz which said I was wrong, when, indeed, I was not: The regular expression [a-z]{2,3}$ will only match YOU WERE INCORRECT The answer you gave: any string that ends with 2 or 3 lower case letters Correct Answer: any string that ends with 2 or more lower case letters [a-z]{2,3} will match only 2 or 3 lower case letters at the end of a string, not 2 or more.

that's a total of 7 links to http://www.wellho.net/quiz/phpquiz.html

Reviews for http://www.wellho.net/mouth/158_MySQL-LEFT-JOIN-and-RIGHT-JOIN-INNER-JOIN-and-OUTER-JOIN.html

Atomic AlienZ said The best explanation of JOINs I've ever seen. Thank you it was most helpful=)

Anon said Is the outer join really needed. I mean we can get better results by using " NOT IN".

Anon said Is the outer join really needed. I mean we can get better results by using " NOT IN".

sharath said it was very clear ...

Anon said Thank you. All I was looking for.

Saidul Islam said I've read many article but i cudn't understand the SQL JOIN. But this article takes 2 minute to teach me that. Nice article... Thanks to author.

Jam said nice one! (~~,)

Danish Ejaz said Good,Excellent Understanding of joins. Thanks a lot

Mohiuddin Khan Inamdar said Nice One ...... good effort to help out others.. just landed here because of exclusion queries.. from google have a look at this page too. http://r937.com/list.cfm?page=sql-articles regards Mohnkhan

Anon said Illustrated in simple way. Very easy to understand. Thanks.

Sudheesh said great.........easy to understand..........keep it up..........

Rashid Ali said ITs just a great artical to uderstand the JOINS in SQL ... great work ... keep it up

Nirmal said Very good explanation

Shawn said Thanks. Neat explanation.

Anon said great!!!simple !!hurray!!!!!!!!!!!

Sameer said Nobody can clear JOINS as this manual has done. It is SUPERB.. Thanks. It helped me a lot to understand. I will appreciate if you can make much clear to the INNER AND SELF JOINS.

Anonymous said great explanation on a subject that's very confusing.

kj said No one can explain with more simplicity than this. Any one who doesn't understands after reading this simple example can't ever understand. Really thanx a LOT

Anon said At last! A simple effective explanation of the 'joins'.

Mandar said Thanks for the Excellent help ! :)

Rupinder Singh said A good brief tutorial on joins. Helped me a lot .

MyMaster said Really it is excellent .............

edw said I'm very pleased with your clear explanation. I'v seen some other examples but this one just hits it all. Directly! It made me understand.

El Sayed said I'll use this idea explaining Joins 2morow isA Thanks

Veejay said Its excellent, to the point and very clear. thanx a lot for this buddy.

Priya Saini said This is 'Simply' the best explaination. Concept of join always confused me... nw not any more

vellaidurai said this is one of best and very simple explanations and examples.do keep this..

Roman said Very good article which clears the things which were not clearly described in the manual. So it's a good example when developers can make something seem much more difficult than it actually is. I'm good in SQL, I've known about LEFT and RIGTH joins, but seeing INNER and OUTER JOINs I thought that there was still something that I didn't know! :-) So, there are actually just TWO types of join (having in mind that RIGHT JOIN is the same as LEFT, but with different table order): So we have ordinary JOIN, which is THE SAME as joining tables without JOIN keyword, but delimiting tables with commas and putting condition in WHERE clause (you can call it "implicit join"), so the example from the article will look this way: select name, phone, selling from demo_people, demo_property WHERE demo_people.pid = demo_property.pid; which returns only matching rows combinations from both tables, and we have LEFT JOIN, which always returns ALL rows from the first table, and if a row from the first table doesn't have any matching rows in the second, we get single resulting row with null values for all columns of second table. I prefer to use "implicit joins" instead of JOIN keyword when I need only matching rows, and to use LEFT JOINs when I need "NULL rows" to present in the result (if they exist of course), as it helps me to immediately see what type of query it is (as the difference is really important!) - completely different syntax does not give you a chance to confuse.

K said Thank you very much for making it really clear !

Dror said Thanks (-:

Anon said nice, thanks

Jose Espinal said EXCELLENT!!!!!!!!!! thank you man... THANK YOU!!!!

Anon said Simple and effective to understand join sentence.

Cyriac Peter said A very good article. Thanks a lot for posting this.

suresh said Simple and easy understandable examples. Thanks a lot. give examples for inner and outer joins also.

Anon said This is really a good tutorial for those who want to understand joins

Pankaj Jaiswal said It provides an execellent understanding of Joins

vipin said very good explanation and examples...

shawn said WOW THANKS FOR MAKING THIS SO SIMPLE. A lot of articles on these subjects are often overcomplicated.

Anon said it was really nice,, he really can explaid it

Prasanna R Raval said This is very good example for Join in mysql.

Marcob said thank you. now i really understand left adn right joins

Anon said You're good... thx man.

justGrayWind said Просто и доступно :) Ура! Спасибо! Simple and to the point :) Hurray! Thanks!

Murugesan said Its a very excellent article for me

Mohamed said Thank you, it is short and good.

bharathiraja said It is really usefull, no one can explain other than this

Manish Jain said Very well defined clear and short description of Inner, Left and Right joins

Rajan Rana said very brief and well written , well done

Graham said The Accessibility link on the right of every page lets you select a larger or smaller font size, and it also lets you change the page colours. Regrettably, there is no single size / combinations that's ideal for everyone.

Chris said Thanks for all the information, I was quited puzzled about the differences before. Now it's all clear. :) One small tip: font-size is a little too small, it's hard to read sometimes.

Graham said Sasha, I'm aware that left joins are widely supported by databases, and right join is much less common. Indeed, right join was added after left join to MySQL and people running an ancient versions may find left words and right doesn't. I don't see that this makes any difference as far as the text on this page is concerned, though - it's a broad overview and helps a lot of people start to understand the difference - it creates "lighbulb moments" and if people need a lot more they can go on and read more in the thousands-of-pages long manual.

Sasha said Hi! In the MySQL reference written following: "RIGHT JOIN works analogously to LEFT JOIN. To keep code portable across databases, it is recommended that you use LEFT JOIN instead of RIGHT JOIN. " so, your examples are incorrect.

ZigZag said Spot on for us puzzled by joins

Anon said Thank you thank you

Anon said Best short left right join description I've seen yet

Anon said Thank you.. now I understand joins

Grateful Anon said This is absolutely perfect - I was puzzling over joins today, not completely understanding what the difference was between INNER, LEFT and RIGHT. This page explained things so that a light bulb went on over my head the very first time I read it. Thank you!

Patrick said Great explanation -- many thanks!!!

Anon said Fantastic: finally understood joins!

Anon said At last! Thank you

Patrizia said Finally what I've been looking for. Simple and clear. Thanks!

Gert Cuppens said This was the page I've been looking for. It gave me the wanted information in a very brief manner, just what I needed.

Graham said Left, Right, Inner and outer joins in MySQL (and joins that don't use any of those words at all - and perhaps not even the word join) seem to be a cause of endless confusion. This page is one of the most visited on our website! "People who visit this page also visit our page on using LEFT JOIN to connect 3 or more tables" and you can get to that page through my suggested link on this comment

that's a total of 64 links to http://www.wellho.net/mouth/158_MySQL-LEFT-JOIN-and-RIGHT-JOIN-INNER-JOIN-and-OUTER-JOIN.html

Reviews for http://www.wellho.net/downloads/

hari said Top quality stuff....conscise yet just easy to understand....hats off to the tutorial team. My request wuld be adding even more comments to the scripts you provide for download..it would be useful for begineers like me who cant afford a course such as this.

Alvise Valsecchi said The free download PDFs that you offer are top quality. I wish I could have downloaded more. If I were living in the UK I'd signed for your Java courses. In fact these days I am switching from Perl/CGI to J2EE. I have bought a few books, I am studying documentation from Sun, but I have found no as clear words as in your PDFs. Thanks. Regards.

that's a total of 2 links to http://www.wellho.net/downloads/

Reviews for http://www.wellho.net/course/sj.html

Graham Ellis said James, Google is a somewhat blunt tool in looking for information and will often send you to a series of pages that don't match your exact requirement. In this case, our Java courses do include some coverage / mention of Ant but they're not fully BASED on Ant, and I'm sorry we can't offer you what you were looking for.

James Migue said I am interested in taking a Java course with a focus on ANT. Google sent me here but now that I'm here I have been frustrated in the extreme trying to find the information I am after I have given up

that's a total of 2 links to http://www.wellho.net/course/sj.html

Reviews for http://www.wellho.co.uk/resources/P201.html

Graham Ellis said February 2005 - Currently training on Perl 5, but listening to the "bigwigs" talking Perl 6 so that we have no shocks when that comes along. Plans are in place for Perl 6 conversion training at the appropriate time

that's a total of 1 links to http://www.wellho.co.uk/resources/P201.html

Reviews for http://www.wellho.co.uk/resources/deutschland.html

Graham Ellis said Feb 2005 - next week I'll be in Munich. I always enjoy training in Germany; please forllow the link with this message for a private on site course quite

that's a total of 1 links to http://www.wellho.co.uk/resources/deutschland.html


Well House Consultants, 2008

Training sample © 2008, WELL HOUSE CONSULTANTS LTD
This is http://www.wellho.net/demo/revinf.php
See source code here • More examples - same topic here
Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
Phone: +44 (0) 1225 708 225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net