Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (110)

Sign In or Sign Up now to post a comment!
  • can you help me with this error after doing all you've done from part one to part two?..

    "Parse error: syntax error, unexpected T_ELSE in C:\xampp\htdocs\acme_corp1\dis­cussion_file\building_a_cms\hr­efselected\index.php on line 39"

  • and this error:

    Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\Users\Mario\Desktop\General Websites\Template 2\xampplite\xampplite\htdocs\P­ortfolio2\Administrator\galler­y\uploadimg.php on line 42 Problem uploading image.

  • I made this tut but it show this error:

    Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\Users\Mario\Desktop\General Websites\Template 2\xampplite\xampplite\htdocs\P­ortfolio2\Administrator\galler­y\uploadimg.php on line 42

  • can u pls help me to display my products in different pages categorized by bags, dresses,sandal and accessories...using table databases using php??? this is my projct...huhuhu...pls help me... ds s my email anne_bonch16@yahoo.com

  • image won't display

  • not gayly but i love alex .....aaaaaaaaaalex

  • Wtf, once I write "type="file" the button automatically displays "Choose file - no file chosen". How do I change this if I want it to display in a different language or give a different message?

  • @PktMma yeah im looking for that too =/

  • man its nor working. when I write the part checking if you sent something it never shows the content of the image. it just shows me "no file chosen " and the script "error_reporting(E_ALL ^ E_NOTICE);" is not solving the problem, its just ignoring it. when i open the site in my browser it does not fix it!!!

  • the upload is not working. I've followed all the codes and its orientation.. but the upload seemed erroneous. It says problem with the upload. The query for the INSERT INTO tablename is not working properly and everytime I check the database, no data was uploaded.

  • sir.. can you make a tutorial.. that a user can input a name, description, as an input, and then together with the form is an upload image.. that stores in ex."imagefolder" just like what you have shown in this tutorial, and stores all into the database.. this one is my thesis sir..hope u could help me..

  • so strange, when i put the 'please select an image' statement in like you did at 12:12 it doesn't show, before or after the upload. and when i put echo in front of $file like you did at 11:15 but it seems to show a random string like /var/tmp/phpAkA7U8 even before i upload anything.

  • Comment removed

  • Hi do you have a tutorial for displaying the images?

  • very nice and understanding

    keep posting more...

  • Comment removed

  • sorry guys hold on the code was too long to post on youtube I will find a way to get it to you soon.

  • hey guys here is the full code that i used:

    make sure you change all the appropriate Database table information to your table for your image files also change the config information - example: "Your_host" to your database host, username, password and database information so it works for your database:

    name the file: image_results.php or something you want

    place it in the image directory you create that all the images stored in.

    also don't forget to wrap all this in php tags

  • for all who can not see images use codes:

    $db_img = base64_decode($db_img); echo ($db_img );

    $db_img = imagecreatefromstring($db_img)­;

    you have to base64_encode it first then base64_decode it...then use the imagecreatefromstring() function.

    if you want the code email me....

  • @mikemerr

    put this code where?

  • @mikemerr Hi Mike Where can I email you? I need help displaying the image thanks

  • @cadysistemas

    message me in my yourtube inbox and i will get you what you need.

  • @mikemerr Mike where can I email you Because I used : $image = base64_decode($image);

    $image = imagecreatefromstring($image);

    header("Content-Type: image/png");

    imagepng($image);

    imagedestroy($image);

    Whitout results, could anybody help, because no clue what is wrong Also when I check the source code I get I'm pretty new on php. Alex any suggestion to display the image?

  • @ahmedebeid Hello.

    This is not an error. It is "only" a Notice. It works also with this notice. You can disable it by putting error_reporting(0); at the top of the php script file.

    Regards,

    Mogress

  • @Mogress This will stop all sorts of errors from showing wich could be a problem. This is more specific and therefor better:

    error_reporting(E_ALL ^ E_NOTICE);

  • Thanks for the great php and mysql tutorials.. I really enjoy them.. I'm learning very useful things from them.

  • EXTRA!

  • Before $file get a value from $_FILES, $_FILES need isset into the page. When you open the site, $file will the value of $_FILES, but it isnt exists, when you open the site, and the image is not chosen. I think it is better, to check the $_FILES before $file will take the value of $_FILES. The checkcode "if(isset($_FILES['images'] ['tmp_name']))". This can fix an Undifined index-error.

  • Nice tutorial it is very use full

  • are you using wamp 

  • @095jamie he is using xampp

  • lol the undefined index's are normal - hide them with "error_reporting(0); "

  • Alex thanks so much for the tutorials. How about for several images?

  • how can you do this for more than 1 image? An to keep all images in the same row of the database.

  • No matter what I do all the error messages display, even though the image is successfully uploaded to the database table.

    The problem seemsto come from incorrectly placed function brackets; I've tried all I could but am at a loss. It works, but it's ugly.

    Anyone knows where to find the file so that I can compare it with what I have?

    Cheers!!!

  • please help erro at:

    Notice: Undefined index: image in C:\xampp\htdocs\xampp\php\uplo­ad picture to data base\index.php on line 22

    please select an image.

    i finished the program its working now... but i get this error..

  • @killerboduk999 I have the same problem. have you got the answer?

  • @am84pm not yet :(

  • @killerboduk999 I don't why he is not responding...... I must go and get another tutorial...

  • @am84pm hahaha theres a new video image uploading site...

    i think your problem was the php version try to google if(isset($_POST[''submit]))

    {

    code here/////////////

    }

  • @killerboduk999 I try to change it. I'm using php5 .thanks for the advice mate.

  • @am84pm hey if you see an php chat tutorial just pm plssss...i need a private chat ill add to my site...

  • @killerboduk999 its normal getting that error if that variable doesn't have any value you can turn in off by typping: error_reporting(0);

  • ***TO ALL WHO GET ERROR***

    Notice: Undefined index: image in C:\xampp\htdocs\xampp\php\uplo­ad_img\index.php on line 22

    This is not something that will cause any problems. Alex from phpacademy would get the same error but he has disabled this type of error and therefor it's not showing.

    THE SOLUTION:

    At the top of the PHP-code, under <?php, add the following code:

    error_reporting(E_ALL ^ E_NOTICE);

    That will stop this error from showing.

    LIKE THIS SO THAT MORE PEOPLE CAN SEE IT!

  • how can i convert to multiple uploader. please help thnks

  • @ahmedebeid @phpacademy yes please im having the same problem. i think there is no answer for this...

  • i need this but in jsp :(

  • make a video showing how to setup phpmyadmin

  • @1EverythingFunny1 why would he do that? so easy theres only like 3 vids on it. Search!!!!!!

  • @1EverythingFunny1 you should not be here if you dont know that

  • i get the same error.

    Undefined index: image in C:\wampw w w\Folder\index.php on line 19, where $file = $_FILES['image'] ['tmp_name']; at 10:50

  • @mrjonesgl Same problem for me

  • thanks to you! helped a lot!

  • this is VERY helpful! thanks so much!

  • all the videos here about uploading this is the most helpful! many thnx PHP Academy!

    subscribed!

  • This video is one of the best tutorial videos i have ever seen online...Thanks a million

  • your tutorials makes we want to learn more ^^

  • Great tutorial!!

    thx thx!

  • can't view the image,how do i fix this?

  • I am not a PHP developer, yet this video is very informative!!

  • Can you do a video (or explain) how to have the photo upload function within a form? Also, can you use Dreamweaver CS5?

  • is this type of storing is same fast as storing in specified folder.. like when you use it in slide show images it has same speed with storing in folder?

  • SIR....YOU ARE A LIFESAVER...

    Thank you so MUCH

  • Can you use the BLOB for different stuff other than images?

  • How would you restrict the size of the images that were being uploaded?

  • i can't view the image i iploaded and iserted to the database?

  • everything is working fine......but m unable to view image....a small box with a question mark is appearing... i checked...the file contents are there...but it is not displaying the image....what am i doing wrong? please help

  • @sidjustice007 I am having the same problem. Have you sorted it? Thanks

  • If you did want to display all of the images that are in the database, you would do a while loop. Just in case anyone wanted to know.

  • can you help me pls!!!hOW to RESIZE THE IMAGE...i want the size just like FACEbOOK profile pic..pls help me sir.,..

  • @kdodz Well, you can either make the user crop the image after upload, or you can automatically resize it. Or, you could just only allow a certain dimension of image.

    It's up to you how you do it, but may I ask why?

  • Never, never, never upload files in database!!!

  • @nasisof why never never can you tell us why?

  • test #TEST

  • yeah nice..

    keep posting more...

  • u sir are epic...

  • After the "your image" title I get the blue box with the question mark in it. For some reason it's not displaying the image... why is that? Someone please help. Thanks in advanced!

  • @SmithyProductions When I submit it in the echo on the "file_get_contents" I get a whole bunch of "�PNG  IHDRli߫�~ pHYs.#.#x�?v OiCCPPhotoshop ICC profilexڝSgTS�=�..." Why are there "�"'s there? Thanks

  • When I submit it in the echo on the "file_get_contents" I get a whole bunch of "�PNG  IHDRli߫�~ pHYs.#.#x�?v OiCCPPhotoshop ICC profilexڝSgTS�=�..." Why are there "�"'s there? Thanks

  • @KavzXox

    Your not "calling" to the right area in your database. You should have 2 .php files in your "htdocs" directory. Hopefully you have made a new folder. Then, in your get.php file, when you select * your database with the SQL command, make sure that the table you are calling to in the index.php has the field that $file=$_files['whatever field'] in it.

  • Getting an error on line where we define the file which is $file=$_FILES['image']['tmp_na­me']; Im using php ver 5.3.0 and mysql 5.1.36. my error definition is Undefined Index Image: any thoughts??? please help me out... thnx in advance

  • Comment removed

  • genius! is this guy a human or martian? must be german or something

  • @ncbookz hes mexican lulllulul

  • @scrawfosean impossible! no mexican is this smart! i have had many mexican friends and they can not even speak english properly

  • @ncbookz WTF?!?!!?

  • @shapeshifter987 just joking

  • @ncbookz LOL hoped so haha. cheers!

    BTW, great tut!

  • Thank you. You have such a calming attitude and explain things so well. This is my first time subscribing to a channel on YouTube. You have a new student. :)

    Thanks.

  • THX ALEx!

  • Comment removed

  • my file input thing is setup different from yours, mine has a text area and then a browse... button

  • Hello, Alex. i have a question : What are the vid dimentions? (Bad English ;// ) is : 320x240 ? or what? (Sorry for my really bad english)

  • Yeah. This video almost makes me want to code again.

  • @Acceptable76 You say that in every video

  • @UnrealNate Eh? I hardly comment. What are you talking about?

  • First comment :3

    I just wanted to be first on a video ;D;D

  • And btw, your video's are awesome, I learned alot from it, and now I've made 2 websites that is functional :3

    Nice alex (Y)

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more