Тёмный
No video :(

52: How to upload profile images to users using PHP - PHP tutorial 

Dani Krossing
Подписаться 479 тыс.
Просмотров 255 тыс.
50% 1

Опубликовано:

 

21 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 389   
@gamerkob
@gamerkob 7 лет назад
Please do a video on how to send emails to confirm email accounts and forgot password recovery. Awesome teacher!! Stay blessed.
@phoenixfront
@phoenixfront 3 года назад
I’d recommend using an external api for it such as Facebook account kit or use php stmp send mail
@riskitall7421
@riskitall7421 6 лет назад
Daniel, your voice hasn't changes for the 3 years I've been learning from your tutorials; you're like the most positive guy ever! Keep being you, I love it.
@Dani_Krossing
@Dani_Krossing 6 лет назад
Thank you :) Creating video lessons is what I love, which is probably why I'm still staying positive :)
@HannesF
@HannesF 7 лет назад
I really love your tutorials, they are so easy to learn and your voice is so calming and smooth, haha, thank you for these.
@Dani_Krossing
@Dani_Krossing 7 лет назад
Hannes F. Haha thank you for noticing my "smooth" voice :)
@HannesF
@HannesF 7 лет назад
Haha. ;p
@masteravity9991
@masteravity9991 7 лет назад
Hannes F. x mmtuts
@math260879
@math260879 3 года назад
@@Dani_Krossing Nice tutorial but *how can I hide the login button when the users are already logged in ? AND how can I hide the logout button when the users already have logged out* ?
@malibaturhan
@malibaturhan 3 года назад
@@math260879 already shown in login system tutorial look at the playlist
@tharunrocky14
@tharunrocky14 6 лет назад
So awesome! I know its such a pain to record all these videos with Quality Content in it! Thanks for it! You're a Pro!
@muneezanasir3276
@muneezanasir3276 4 года назад
Your tutorials are amazing. They are so well explained and you have covered every bit of the language. FYI, I followed your tutorials and I got an internship. So thank you for making all these wonderful, full of php knowledge videos.
@ulosturedge
@ulosturedge 7 лет назад
I was able to do your login/signup system with just a few mistakes and then I rushed through your command lines on this one and had all kinds of errors lol. I was a little frustrated at first and stomped, but I eventually caught all my mistakes. I actually learn more by messing up the code then doing it right, haha. It forces me to learn to read the code and learn how the errors correlate with my syntax mistakes. It also forces me to experiment to validate how far the code is actually processing correctly. Thanks Daniel, your tutorials are very informative with your explanations. Keep them coming. :)
@Dani_Krossing
@Dani_Krossing 7 лет назад
I'm glad you got it working :)
@AtesotFlavor
@AtesotFlavor 3 месяца назад
HI Dani! I'm a recent fan of yours myself. Love your teaching style. So positive and a great sense of humour. Aside that, I am having issues with mysqli_connect. In other lessons when you use PDO there hasn't been any issues in-that I could submit data to the database. But with mysqli_connect, nothing happens. Any suggestions on how to make mysqli_connect to work properly on my Mac? @@Dani_Krossing
@cleverengineer2410
@cleverengineer2410 5 лет назад
IF I was to praise you for your tutorials it won't stop but thank a millions times
@ck0024
@ck0024 5 лет назад
*Understood all videos except this one. Watched 5 times but couldn't understand the logic behind it.* 😥😥😥
@thezvid
@thezvid 4 года назад
yeah me too and is it better to merge tow tables and inside the user table create a field called profile image status?
@rodbongosia
@rodbongosia 4 года назад
@@thezvid you're right this while login is not good. it always appear multiple row of profile image in your login because of different table he used can't get specific row from the same id
@ivansavchenco5636
@ivansavchenco5636 4 года назад
When you do not understand something just go to the previous lesson with corresponding topic. It really helps.
@mjhmobilemedia
@mjhmobilemedia 4 года назад
It's just an exercise. I learned something. Whether I ever use this method myself or not, I'm not sure. If I do, I'm sure I will probably build on top of it and do a lot of refactoring.
@SdotFive
@SdotFive 3 года назад
same....i would've like it better if he only wouldve focused on the profile image. Signing in and out has been covered by him several times over
@jessreygarrido1047
@jessreygarrido1047 3 года назад
I love the tutorials but I get genuinely confused sometimes. The discontinuity of the projects feels so bad and I get confused in editing some parts because I don't know how to connect the things together. But I learned a lot. I'm probably just stupid anyway.. thank you ^_^
@YPTechDATIA
@YPTechDATIA 3 года назад
Dani you are great , you are better than stack overflow
@jaycelila6258
@jaycelila6258 6 лет назад
Best tutorial on RU-vid.
@lebronzejames
@lebronzejames 4 года назад
WOW Man was this one ever the bees knees.. I had a 3 day time (I'm legit a beginner just started coding php last week thanks to you) figuring out how not only to mash this into the previous episode but also your large 2 hour login system video which idk on your upload schedule but it seems like it was a reupload and came years after this lol.. good fight though I STILL dont have the idea 100% at this time but I'm PRETTY sure I know where to go from here and this video has helped me as far as it can so thank you so much Daniel you are awesome brother. If anyone's having problems with this still let me see if I can point you in the right direction with issues I faced: FIRST let me disclose i tossed away his second table profileimg all together and used the previous login database which in that other video he called "users" which already had 4 categories idUsers uidUsers then email and pass but those two are the important ones. so first I added a column to my table called status just like his: int (11) not null etc issues I faced were not paying attention to when I was supposed to be SELECTING from the number column or the name column.. you have to follow this video exactly and anywhere he writes ANYTHING with an id first its always referenceing the number one in my case was idUsers. likewise anything he writes with a username for me was uidUsers Dont be a hero and write your own attachments or improvements if your a beginner like me .. you dont know the jack you think you do lmao big tip here wasted a lot of hours like "man i know whats going on here so what if i..." yeah dont lol I ran into an issue where i accidently called my default profile image "profiledefault.jpg" lmao it kept showing up as a blank square instead of the image and glancing over the comments i might have been the only dummy on this one lol. I was essentially looking for something called "profiledefault.jpg.jpg" unintentionally. Lastly I have completely different login and signup systems .. if you have one like me you can circumvent that entire signup segment in here by just simply adding a parameter to your signup.php or whatever you call it in the INSERT INTO section youd already have and add a VALUE to it of 1 in my case hed used several questionmarks mine looks like this now: INSERT INTO users (uidUsers, emailUsers, pwdUsers, status) VALUES (?, ?, ?, 1) thus rendering all this: $sql= "SELECT * FROM users WHERE uidUsers='$username'"; $result = mysqli_query($conn, $sql); if (mysqli_num_rows($result) > 0){ while ($row = mysqli_fetch_assoc($result)){ $username = $row['uidUsers']; $sql = "INSERT_INTO users (status) VALUES (1)"; mysqli_query($conn, $sql); } } Useless... (note the types of changes i had to make from his original code and you could easily do this also) but make sure you look in your login system and be mindful that your _SESSION ids are set correctly i was trying to use stuff like idUsers and my uidUsers in places i should have had my actual _SESSION id's .. Which as a quick example are $_SESSION['userId'] = $row['idUsers']; so i had to go back and find anywhere he referenced his first table which i diddnt have as either just "id" or "username" or anything like that and make sure i had the right ones.. using one table it actually streamlines the process cutting out a lot of EXTRA stuff. Hopefully this helps anyone lol I wish someone would answer some of the questions in these comments much more when they figure them out haha .. oh well help where I can much love all =)
@olukoyaabbey5534
@olukoyaabbey5534 3 года назад
Thanks so much Dani, you are an amazing teacher. Interestingly concepts from your teachings have been so helpful in preferring solutions to some of my projects , sometimes unrelated to the tutorial. Keep up the good work sir!
@ashleyehle3382
@ashleyehle3382 6 лет назад
I already did your tutorial on how to make a login system. how would I ad the image upload to that?
@gonefishing2006
@gonefishing2006 3 года назад
@Visions Weekly Magazine I kind of agree. He did update the login one and I wish he would have updated this one but connected it to the login form and made it it into some sort of profile page with image. But I'm actually figuring much of it just using the few of Dani's videos and the stuff I've been picking up along the way.
@patrickrenzgarcia1765
@patrickrenzgarcia1765 3 года назад
Finally! your tutorial helps me a lot for my school project
@suraamilbahar948
@suraamilbahar948 4 года назад
@42:54 I am stuck in this part. I don't see default pic and the username.. But I did follow everything.. Help..
@daverdal1
@daverdal1 7 лет назад
Awesome video. Thanks for doing my assignment. Gives me time to go for a bike ride today!
@brucetamata7151
@brucetamata7151 Год назад
videos still useful today . Thank you
@sandy3028
@sandy3028 5 лет назад
Your channel have saved me many times now! Thank you!
@mackynikat8833
@mackynikat8833 3 года назад
Tnx a lot to the efforts sir ... Now only had left about statuses not alone in their data
@SanjeevBeekeeper
@SanjeevBeekeeper 6 лет назад
If you get a blank page after you Signup. Make sure your Signup form has an action to the 'signup.php' page and not 'login.php' page
@manvswildjungle8081
@manvswildjungle8081 Год назад
💯💯
@adnanshoukat2300
@adnanshoukat2300 7 лет назад
u r such a great teacher i ever seen respect from pakistan
@XJerome124
@XJerome124 5 лет назад
Thanks for all these tuts, they are really helpful, this one was a handful tough!!! I just finally got it.
@RubaAab
@RubaAab 6 лет назад
So nice of you for teaching us all these about php. Please guide how can i launch mob camera in feed back form.. Like there will be a feedback form with submit option and capture image option.. The capture image option should turns on the mobile camera and take the picture, save it in sql data base and send along with the form when clicked on submit button.
@chrisvillareal7140
@chrisvillareal7140 5 лет назад
The tutorial is good but I suggest you also discuss about checking mime types of images. The hackers can name their shell scripts to any image file by just changing the extension name and bypass your validation.
@sergiu2325
@sergiu2325 5 лет назад
At last a guy who can explain stuff.
@gonefishing2006
@gonefishing2006 3 года назад
Question: On the upload section you allow .jpg, gif, pdf, etc. to be saved to the uploads directory but line 26 when you log in appears in my head at least to only recognize .jpg. Do I need to consider the filename like was done in upload.php so it will process the other types? Otherwise I got it work (with some minor modifications.)
@maajabusafaris9826
@maajabusafaris9826 4 года назад
You are amazing you solved my 2 nights of sleeplessness i will check other things you offer and if there are some sort of courses then i have to buy from you!
@loxiurasitz6248
@loxiurasitz6248 7 лет назад
Great vid! I wish u a beautiful new year! Have some nice days.
@legendofgaming8481
@legendofgaming8481 2 года назад
Hey love the video, I am not sure why isn't my profileimg table updating when the users sign up even though I followed all your steps. Do you get any clue what might be the issue?
@johncedricdeluna3781
@johncedricdeluna3781 6 лет назад
great tutorial bro! nice easy to understand and you did it from scratch .
@malikumairmukhtar
@malikumairmukhtar 7 лет назад
This was the most difficult video to understand for me among all PHP tutorial videos. I have watched it 4 times and still unable to understand. All the videos are adorable but I am really stuck in this video.
@m.houdeib
@m.houdeib 6 лет назад
same for me
@ck0024
@ck0024 5 лет назад
*Same here. Couldn't get it at all.*
@jonathanel-aziz2208
@jonathanel-aziz2208 4 года назад
Same to me, mixing the php code with the HTML code is not good because it's hard to understand.
@jayce5128
@jayce5128 6 лет назад
after I log out from other user then log in again for another user, the image from the past user is still in there, how can I display only the profile image of the logged in user?
@adamjones6473
@adamjones6473 5 лет назад
I'm running into the same problem.. rip
@helena8918
@helena8918 4 года назад
​@@adamjones6473 I guess you only need to do show the img where the userid is equal to the $_SESSION id variable with a "if" stmt
@vishantsoni1242
@vishantsoni1242 5 лет назад
hey! daniel your tutorials are very good and easy to follow keep up the good work
@HarryTeran
@HarryTeran 7 лет назад
pleasee make the next video about templates, and use bootstrap to make the page without using tools like (twig). Love your vids! You are an incredible teacher!
@eosforfly
@eosforfly 7 лет назад
bleach boostrap, is for leasy...
@konstantinoskontras5523
@konstantinoskontras5523 6 лет назад
Great videos learning everything properly and probably better than uni. You should take a look at the
@Dani_Krossing
@Dani_Krossing 6 лет назад
Hi and thank you :) I know about these attributes, however you shouldn't use them instead of what we did in this video. Because it is incredible easy for anyone to get around attributes, by simply going into the browsers build-in developer tool, and then remove them before submitting the form.
@HarshdeepSingh-iz6gr
@HarshdeepSingh-iz6gr 4 года назад
It's a wonderful tutorial. I just think there's one flaw, when you echo the image that we uploaded, you mention the extension to be ".jpg". But it will not find the image if it had some other extension. Please correct me if I'm wrong.
@natnaelalemayehu9112
@natnaelalemayehu9112 4 года назад
Yes that is true. I am thinking of solving that problem by having an extension column in my profile image table. So instead of putting .jpg I will put the respective file extension which I will have previously uploaded to the database when uploading the image. I don't know if this makes sense to you.
@SdotFive
@SdotFive 3 года назад
@@natnaelalemayehu9112 im thinking of doing the same
@gamehupbrowsergames4084
@gamehupbrowsergames4084 7 лет назад
hey bro i did all what you said and it work for me but when i ever signup new user the first user image dosint disapear so the new user will see the old user img and i dont want that how to fix this
@junoha6996
@junoha6996 6 лет назад
can you make a tutorial on how to upload or post multiple photos on website?? using php??
@alenasuvorova1340
@alenasuvorova1340 3 года назад
Great tutorial, thank You!! I only can't understand one thing: in the end we can upload only .jpg photos?
@abdallahaldeghli7127
@abdallahaldeghli7127 3 года назад
yes, because he echo ""; in index.php and we must bring $allowed from upload.php but iam not knowing to make it.
@theunboxingchannel3735
@theunboxingchannel3735 6 лет назад
In this lesson when we login by one user id and then log out and then again login with another user id, and then when we go to the profile photo section, then it shows the profile of both the users. The user previously logged out and the user currently logged in. How to manage users profile according to the current session of a single user. Please help me with this.
@nabeeltech7885
@nabeeltech7885 6 лет назад
maybe u need to watch episode 39 or 44 i completely logged out and logged in and logged out and showed current user on website
@Holyschytt
@Holyschytt 5 лет назад
​@@nabeeltech7885​Neither of them videos have anything to do with this.. its something to do with the sessions.. ids now if there 2 or more accounts registered it shows those accounts it showed them in his video
@nabeeltech7885
@nabeeltech7885 5 лет назад
@@Holyschytt hummmm now i am moved to node js which is much tougher but more faster then php next era is node js, go lang and java script type server languages because of their asynchronous behaviour it means they can execute many requests
@dayoungkim1484
@dayoungkim1484 3 года назад
Thank you so much for this video!! I finally put user profile pic function on my project. I have a question. echo ""; With this code, if user selects the file such as png or jpeg not jpg(which is set as default), how can I change the code? It's not like just changing to echo ""; Can you help me?
@truongvo920
@truongvo920 3 года назад
Thank you very much!
@slapmyfunkybass
@slapmyfunkybass 6 лет назад
Coming from a .net background these videos have been amazing in helping me learn php and I think the guy is a great teacher. However, I do think this particular video is made more complex than it has to be, you could pretty much avoid all this and just have a folder that gets created when the user signs up named after their id, in that folder you place a default profile image (default.jpg). If the user wants to change it you simply allow them to somewhere within their profile settings, this overwrites the default default.jpg. Anywhere you want to display their profile image you just point to id of user/default.jpg, doing this you never need to check the database, as the user id will be in session.
@Dani_Krossing
@Dani_Krossing 6 лет назад
That would also be a solution yes :) but instead of having a default.jpg in every folder it would be better to just have the default image in a folder for itself, and point to it if the user hasn't uploaded one themselves. This way there isn't hundreds/thousands copies of the same image on the server. In my example, I place all related material/images in the same folder and catagorize them there after. So there would be a folder for profile images, a folder for banner images, a folder for uploaded videos, etc. And this would make it just as simple to target using PHP in my mind. However I do also soo another benefit in your suggestion, which is keeping the users separate on the server, which could be seen as a safer method in case a folder gets deleted. Since it isn't all users that loose data in this way. I will go ahead and pin this comment for others to see ;)
@slapmyfunkybass
@slapmyfunkybass 6 лет назад
mmtuts Thank you for the feedback. You are right, having the one image would be better, I guess another way would be checking the directory of the id folder for default.jpg, if it doesn’t exist use default image. It’s only an idea though. Thank you for your time and advice, it’s appreciated.
@1coinh
@1coinh 4 года назад
Great video!
@mjhmobilemedia
@mjhmobilemedia 4 года назад
It works. Thanks.
@SDVVideoProductions
@SDVVideoProductions 7 лет назад
Great tutorials so far! Is there a reason why you created two tables instead of just inserting the status column into the user table or even just checking if the correct file exists (by naming the pictures according to the user's id)?
@Dani_Krossing
@Dani_Krossing 7 лет назад
I created two tables because I wanted to keep the users startup information (the info provided when signing up) in a separate table, and the later added information in a separate table (such as profile image, banner image, profile settings, etc). But it is perfectly doable if you add all the information in a single table.
@SDVVideoProductions
@SDVVideoProductions 7 лет назад
Thanks for the response! :) Is it to keep it clean or to avoid performance issues (or some other reason) that you keep track of the status in the database instead of just checking if a correspondingly named file exists in the uploads folder?
@aghahusnain4424
@aghahusnain4424 4 года назад
Amazing tutorials. Would recommend it to everyone starting php. Helped me out alot. Thanks.
@sumeyradavran4738
@sumeyradavran4738 7 лет назад
Perfect tutorial!
@jackmuxy
@jackmuxy 4 года назад
I did the same thing but the updating profile picture part doesn't work in my case
@siriykeiceweb4125
@siriykeiceweb4125 5 лет назад
You are pretty cool in your teachings man.....
@gastroesophagealreflux6285
@gastroesophagealreflux6285 4 года назад
Great teachings! Thank you! :) I got it all to work together with your last tutorial on how to make a login system. If you are anyone else is reading this, can you please help me with one more thing, as I am not educated in programming. Currently I can see all the users when logged in, but is there php/sql code that shows only the avatar of the current person that is logged in? session if you will. Many thanks and best regards! :)
@winoline
@winoline 4 года назад
The best ever, thank you.
@teodorvijiianu41
@teodorvijiianu41 3 года назад
Thank you!
@wilburtmoreno469
@wilburtmoreno469 5 лет назад
does anyone having trouble on changing profile picture from the default.jpeg to any other picture?
@darox3549
@darox3549 4 года назад
Yes, me... did you fix it?
@theforgotten22
@theforgotten22 4 года назад
@@darox3549 For me it was the SQL tables had an autoincrement that never reset, so on upload.php userid =/= $id so it could never link the img and the account together.
@swornamayeepradhan2666
@swornamayeepradhan2666 6 лет назад
Thank you so much. I am getting benefit. Thank you
@JonathanMalmberg1999
@JonathanMalmberg1999 7 лет назад
yeees finnaly! Awesome video
@ayeshatariq3315
@ayeshatariq3315 6 лет назад
Thanks for the great tutorial ! :)
@jessephrolandcatalan7824
@jessephrolandcatalan7824 7 лет назад
i am curious about how if the file extension is png not jpg ?? may error will occur to???
@Dani_Krossing
@Dani_Krossing 7 лет назад
The next video shows me fixing that :) By mistake I forgot it in this episode
@gonefishing2006
@gonefishing2006 3 года назад
@@Dani_Krossing I guess I may have found the answer to the question I had earlier. So next episode I go when I have time.
@adamjones6473
@adamjones6473 5 лет назад
Personal Checkpoint 29:00
@souravsingh763
@souravsingh763 4 года назад
Multiple default images are showing at the same time when signup
@loveyvishnani3108
@loveyvishnani3108 3 года назад
Ya...did you fix the problem?
@emanmazenrb2838
@emanmazenrb2838 3 года назад
Thank you so much. I love all your tutorials and I appreciate your sharing. However, this tutorial -and only this one- is kind of messy with incomplete parts. like not being able to log in other than user #1. And having to list all DB users at the top of index page. Anyway, thanks a lot again and again; I know it was for focusing on this certain-topic and I acknowledge that you know best. Highly Appreciated.
@TV-mz7ne
@TV-mz7ne 5 лет назад
*Error related to $conn in mysqli* Having error about "unidentified variable of $conn" MEANING: to $conn doesnt exist, so I went to dbh.php file where definition of $conn is held. SOLUTION: I was supposed to write "
@sunilbehera8160
@sunilbehera8160 7 лет назад
Here, we can only change the profile picture of the 1st user, due to in login.php if(isset($_POST['submitLogin]')) { $_SESSION['id'] = 1; } but how to change profile picture of individual user who logged in ??
@hamzaiqbal8646
@hamzaiqbal8646 7 лет назад
you got answer of this thing ?????
@japsonnahigan9626
@japsonnahigan9626 7 лет назад
yeah how to do that
@jjuless7143
@jjuless7143 7 лет назад
mmtuts How do you log in an individual user?
@adamhardy6765
@adamhardy6765 7 лет назад
You have to set the userid in the url using a get method. The url should look like www.website.com/index.php?id=$userid. with this you can target the individual user through a select statement. "SELECT * FROM user WHERE id=''userid". make sure to set the $userid = sessionid or row[id] of the user.
@magicshroomliberety
@magicshroomliberety 7 лет назад
Can you copy the code out I have been trying and cant get it to work PLEASSSSE??
@vinnyvincent6351
@vinnyvincent6351 6 лет назад
Thank you so much for the video :)
@germanduterte7110
@germanduterte7110 4 года назад
Thank you again
@glensymns6877
@glensymns6877 4 года назад
The default image isn't showing for me. I've checked and my image name in uploads/ and echo string are the same and they are jpg any one know why this is happening?
@buniculflorin
@buniculflorin 4 года назад
There are multiple errors, even with the help of our colleague EL EL, still the code doesn't cooperate, while my coding is still incipient, even with the code from Patreon something doesn't add up.
@masinditower770
@masinditower770 4 года назад
Me too
@masinditower770
@masinditower770 4 года назад
The default img doesn't show up
@abhishekpatil1123
@abhishekpatil1123 4 года назад
Hey , mmtuts All php code is alright but the code written in login.php : header("Location: index.php"); Is unable to work. In fact when I click on submit it lands on login.php page. Please help!🙏
@rabinpradhan5603
@rabinpradhan5603 6 лет назад
how to make a profile image so that after one user login, he can only see his profile image. can anyone tell me?
@121surajvishwakarma5
@121surajvishwakarma5 3 года назад
I am getting like you did... Logged Users Profile Signed up user profile1 Signed up user profile2 .. And so on I just want to show only that logged user... What changes should I do?
@ndastreams
@ndastreams 6 лет назад
How do you make it so it only shows the user's single profile picture instead of all of them? By the way great video!
@weler2491
@weler2491 Год назад
I have a question: in the index.php, in the echo that uploads the custum user's profile image, it's currently set to 'jpg', followed byt the question mark and the mt_rand() functiion. What if the users uploads then a 'png' image? I did the teste and the broweser uploadted a broken image. Is there a way in html language to accept different extensions in the image source? Great tutorial tho, you are a greate teacher!
@niro6856
@niro6856 Год назад
the same thing, did you get answer?
@weler2491
@weler2491 Год назад
@@niro6856 I tried to find the solution for a couple of minutes at the day but i couldn't find it and started taking care of other parts of the project. I tried using * in the extension part to allow any extension but it didn't work on my html..
@niro6856
@niro6856 Год назад
@@weler2491 Thank you for your reply! I tried to solve this problem with gpt, and it's worked! You need to try it
@weler2491
@weler2491 Год назад
@@niro6856 Lol of course chatgpt is always handy in these situations!
@andrew.schaeffer4032
@andrew.schaeffer4032 3 года назад
Hello, thanks for the great video! I went to your source files and wasn't able to find the css file. When do you expect that will be up? Thanks again! :)
@filiphalldin9678
@filiphalldin9678 6 лет назад
If i was using this for an website logo for example. How could i get it to show the "latest" image where i want? can i assign the lastest filename to a variable and then just use that in my "source" part of the imagedisplay tag?
@alessandrorohrs9693
@alessandrorohrs9693 4 года назад
Thank you very mutch
@jebbush2964
@jebbush2964 7 лет назад
Please do a video on how to send emails to confirm email accounts and forgot password recovery.
@kryptoniancuber6063
@kryptoniancuber6063 6 лет назад
if you aren't using a local server you can use the mail function to send an email.
@amoghdatar2726
@amoghdatar2726 6 лет назад
KryptonianCuber how to send mails from xyz@mysite.com ?
@rabinpradhan5603
@rabinpradhan5603 6 лет назад
i didn't see any styleesheet. There is one problem with me. Everything is working but after i choose the profile image, when i clicked the upload button, it doesn't work. But, when i choose image to upload from my computer to the upload folder, it works but not in case with uploading profile Image. is there anyone who can help me?
@robinsonenrique2466
@robinsonenrique2466 6 лет назад
I have the same problem , right now
@rabinpradhan5603
@rabinpradhan5603 6 лет назад
if you get the answer, then let me know.... :)
@robinsonenrique2466
@robinsonenrique2466 6 лет назад
Did you declare the action, method and enctype well? What happens is that my problem was more with what I had in the database than with the program.
@rabinpradhan5603
@rabinpradhan5603 6 лет назад
yup i declare the method post but i am doing with the picture so i don't need enctype. profile image is not related with the enctype i guess. there must be mistake regarding the code inside the upload final destination but it looks look. so i am feed up with these error? did you solve the problem?
@robinsonenrique2466
@robinsonenrique2466 6 лет назад
Sorry but I can not help you, in the end it happens that the problem is my database, the user was different from 1 person who did not identify the state that wanted to change the image.
@JhayPTv
@JhayPTv 3 года назад
all the codes are running but it keeps giving me an error of "Undefined array key "id"" in this code for the profile "$id = $row['id'];" 27:54
@minsoemoe5145
@minsoemoe5145 3 года назад
At 23:00 , how does 'uid' become "Admin" in the output while the placeholder is 'Username'?
@CodemasterJamal
@CodemasterJamal 5 лет назад
Would it be smart to create a parser to parse through the file first or is this method pretty good in terms of security?
@aleksandarkrasic8324
@aleksandarkrasic8324 6 лет назад
I did similar as you since I already used the finished log in system and just implemented all from this lesson and i also used the prepared statements and everything went well, but ... in the database, in user table, whenever I insert a new user the index numbers are going in the reverse direction, from the highest to the smallest, what do you think, what could be the problem?
@arturfornagieri7117
@arturfornagieri7117 5 лет назад
Use blob type to store images on Database ! Nice video working til 2018 .
4 года назад
Never store images in a database. Best practice is to always have a pointer to the image location, and have the images stored on a separate server. Which is why loading images from the root folder of your website is significantly slower than loading them from another server.
@dariusnellsajulga2560
@dariusnellsajulga2560 6 лет назад
Thanks man .
@dariusnellsajulga2560
@dariusnellsajulga2560 6 лет назад
can you give me your db?
@callum345
@callum345 6 лет назад
Curious as to why you haven't just thrown it all into one table?
@timev3tech
@timev3tech 3 года назад
Same exact question.
@pianoLee-sx9dx
@pianoLee-sx9dx 6 лет назад
What does not null mean? I am assuming that if you don't type not null.. the user can leave this blank? At 18:00, you put the form at line 17 but can't you put it straight after line 15?
@ivansavchenco5636
@ivansavchenco5636 4 года назад
Why in SQL statements you don not concatenate SQLstrings.variables.SQLstrings with dots as in other places you do?
@georgiatanasov4273
@georgiatanasov4273 6 лет назад
I have some kind of an error, the userid from profileimg wasn't the same as user's id so I put an equal sign related to their ids which I think is the better option from creating a usless userid column in profileimg table.
@typ0_cratz
@typ0_cratz 4 года назад
So may things are not clear regarding the while after $id = $row["id"]; if you have more than a user, it still gets all of the users right? Am I missing something?
@Joao12PT
@Joao12PT 7 лет назад
Hi, I have a question. The user can upload either .jpg .png .jpeg. . However when printing the image, if the user choosed to upload a .png image the site won't find the image because its written (echo "" ). Any solution ? Btw, great video ;D
@Dani_Krossing
@Dani_Krossing 7 лет назад
Thank you :) Yes i realized afterwards that I made that mistake. The next video has the solution in it where I fix it.
@Joao12PT
@Joao12PT 7 лет назад
Thanks Man :D
@djleisheng
@djleisheng 6 лет назад
You could just save the file extension as another field in the table
@gabrielfono844
@gabrielfono844 3 года назад
@@Dani_Krossing sir please there is no video where you fixed it even in your patreon
@omranshahrour7291
@omranshahrour7291 Год назад
@@Dani_Krossing could you mention it! Thank you in advance
@turbosardar39
@turbosardar39 4 года назад
Don't you think we should use $_SESSION['id'] in index page when we are checking if image is uploaded or not instead of checking for all user? And aren't we supposed to save img to db? 🤔
@povilasbikmanas1643
@povilasbikmanas1643 2 года назад
Was following along the video. At the very end, when you press sing up, it goes to login.php file and then it's just blank. So, I don't know, either I missed something, or there is a mistake. I even compared/copy/pasted the code, and it does the same thing. Very informative videos though.
@BichaelStevens
@BichaelStevens 4 года назад
Will you make a tutorial on making/editing/deleting posts like on a forum?
@user-rk7cw2mw9m
@user-rk7cw2mw9m Год назад
I've already created a JSON file to store user's data using php, and MySQL to store user profile images. Explain as to how i can connect both databases to upload the correct profile image to the user logged in. Or maybe you caan create a video on this please?
@shalempanthagani6034
@shalempanthagani6034 4 года назад
But we need not display every user information(images and username) when signed up. Second thing, when user got signed up there is no header function in "signup.php" that redirects to "index.php". Correct me if I'm wrong :)
@pianoLee-sx9dx
@pianoLee-sx9dx 6 лет назад
At line 17.. do you need to store that in another variable called $id? Can't you just use.. $row ['user_uid'].. directly? Also, why did you use 0 and not 1 as already has a picture?
@Elena-rr5du
@Elena-rr5du 4 года назад
Thank you so much for the tutorial, it is life saving! I just wanted to ask a quick question. I've found that, if the user changes his avatar several times, an each image has a different extension (I've tried the three png, jpg, and jpeg), it creates three files. The avatar displayed tends to always be jpg over png, and jpeg over those two, no matter if the jpeg was the first upload and the png the last. I don't know if I'm explaining properly, sorry. What I mean, is that the avatar showed it is not the latest image uploaded. Does anyone knows how can I fixed that? Please. :c
@dphogat
@dphogat 2 года назад
I have also faced same issue, index.php line 23 is using only .jpg files while submitted image can be of PNG or JPEG format.
@madisentancre5811
@madisentancre5811 2 года назад
Followed ep 51 and 52, when I fill out first name, last name, username, and password and click signup, it says you have an error, also for the index.php( the one with the file size > 100000)
@carsmadness8555
@carsmadness8555 3 года назад
when i log in the original profile picture of the user does not appear and when i upload a picture it does not appear also in the website. Why is that? PLEASE HELP!!
@emberspiritember7971
@emberspiritember7971 7 лет назад
hey men mmtuts which is more efficient to use? making a separate document for every login/logout script or just put it in the same document and make it a function? I think making it a function, but I want to get your side of view :) sorry for bad English :/
@lusingarib
@lusingarib 6 лет назад
Isn't it much more easier to add status column to user table? Or it is not appropriate
Далее
53: Delete profile image using PHP - PHP tutorial
22:37
МАМА И ВАЛДБЕРИС
00:48
Просмотров 717 тыс.
Machine Learning Crash Course: Logistic Regression
3:25
How He Got $600,000 Data Engineer Job
19:08
Просмотров 23 тыс.