i realy like how u keep on saying "thats it" it gives off good vibes thanks for this video series. im on video 5 now. 8 more to go. planning to finish by this coming sunday.
I’m really glad that you’re enjoying the tutorials. Also if you think the tutorials could be helpful to others, then please Share with your Family and Friends. It helps this channel to Grow and your loved ones can also learn Web Development for Free. Thanks and Regards!
I'm really glad that the course was helpful to you. Thank you so much for following. Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends. It helps this channel to GROW and your loved ones can also learn Web Development for FREE. Thanks and Regards!
I'm really glad that the tutorials were helpful to you. Hope you completed all the tutorials. Also if you think the tutorials could be helpful to others as well, then please SHARE with your family and friends. It helps this channel to GROW and your loved ones can also learn Web Development for FREE. Thanks and Regards!
I'm really glad that the course is helpful to you. Best Wishes on your course. Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends. It helps this channel to GROW and your loved ones can also learn Web Development for FREE. Thanks and Regards!
Thanks so much ma mentor really i didn't find somone he explain things by easy and awsome way like u 💛💚❤️ on youtube 😘😘😘😘 i hope u to go a head ♥️♥️♥️😚
I'm really glad that the tutorials were helpful to you. Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends. It helps this channel to GROW and your loved ones can also learn Web Development for FREE. Thanks and Best Wishes!
I want tot ask, why in the href in a tag we print the SITE_URL and write all the path although we can write the name of page that we want to go to it ? 00:04:47
I'm really glad that the tutorials were helpful to you. Hope you completed all the tutorials. Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends. It helps this channel to GROW and your loved ones can also learn Web Development for FREE. Thanks and Regards! Stay Safe.
Hello sir, i have two problems.. if i ad $sn++ and get value to 1 like u on 1:05:02, after that i implement it on p tag and it stays on value 1 on every new row.. and second if i add category without image it will add $image_name value/name food_category_(number from 000 to 999) without dot and end (png,jpg...) but i do it like you with if(...)... else {$image_name = " "} can someone help me? thanks a lot 🥂
$sn++ should be inside while loop. Please check that. If needed, watch the tutorial once again and compare the code. It might help you to find the errors and fix it. Best Wishes!
Sir at 47:00 on line 116 i.e., $ext I'm getting error like only variables can be passed by reference PHP(PHP1401).. please resolve it sir . Due to this error I'm not getting images on website and also imagename is not updated in database. Thankyou
That's just a warning. If the feature is not working for you, then you may have some other errors. Please check your code once. If needed, watch the tutorial once again and compare the code. It might help you to find the error and fix it. Best Wishes!
@@VijayThapa no sir. I've been struggling with this issue from past 3 days. The warning is gone but the image is not uploading. Image name is not visible in the database also. Please provide a solution sir. Thankyou
@@721SreejaGopishetty Then you have an error while uploading the image. Please check your code once. If needed, watch the tutorial once again and compare the code. It might help you to find the error and fix it. Best Wishes!
Thank You So Much for following the tutorial. And I'm really glad that you enjoyed the course and I also support doing your own projects. Let me know if there's anything I can help you with. Also if you think the tutorials could e helpful to others, then please SHARE with your family and friends. It helps this channel to GROW and your loved ones can also learn Web Development for FREE. Thanks and Regards!
Thanks a ton for following the course. And I'm really glad that the course was helpful to you. Also if you think they can be helpful to others, then please SHARE with your family and friends. It helps this channel to GROW and your loved ones can also learn Web Development for FREE. Best Wishes!
I'm really glad that the tutorials were helpful to you. Hope you'll complete all the tutorials soon. Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends. It helps this channel to GROW and your loved ones can also learn Web Development for FREE. Thanks and Regards!
Thank you so much. I'm really glad that the tutorials were helpful to you. Hope you complete all tutorials soon. Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends. It helps this channel to GROW and your loved ones can also learn Web Development for FREE. Best Wishes!
Sir! 51:17 at line 119 you have an issue of repeating especially when you have a large database , the solution to solve the issue is to take it from the auto-incremented ID number that already stored in the database of the Category , this will make no-repeating again in the future how long large your database is.
You're welcome and I'm really glad that the tutorials are helpful to you. Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends. It helps this channel to GROW and your loved ones can also learn Web Development for FREE. Thanks and Regards!
Sir, I cant seem to upload images and it says Undefined array key "tmp-name" as well as Undefined array key "image". I already put a name="image" in the input tag. I cant tell whats the problem Nvm, its been solved due to typos 🤡
It showed me ''failed to add category, because image_name didn't fill, I had to change in database that 'image_name' can be Null data, and then it works.
Okay that's nice. You can either do that. Or add the default image name when image is not selected. I'm really glad that you tried your own solution. It helps you to develop problem solving and debugging skill in you, which is one of the must have skill among the senior developers. Thanks and Regards!
@@Aleksandar-hm8nf I'm really glad that you enjoyed the course. Thank you so much for following the tutorials. Also if you think they could be helpful to others, then please SHARE with your family and friends. It helps this channel to GROW and your loved ones can also learn Web/Software Development for FREE. Thanks and Regards!
Thank you so much. I'm really glad that you're enjoying the course. Hope you complete all the tutorials soon. Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends. It helps this channel to GROW and your loved ones can also learn Web Development for FREE. Thanks and Regards!
Is your image name saved in database? An image uploaded into folder? Please check those, if they're correct then you may have error on displaying the image code. Else you may have error in uploading the image. Best Wishes!
Hi sir, thank you for this. I'm still learning PHP and database and your videos help me a lot. Sir can I request for the full source code of this project?
Sir i have a doubt....that before making the login page you have set the username and password in manage admin.....so is there should not somethig like sign up for news ones
Yes, you can try. It's similar to "add-admin". Simple logic. When project is first launched, check whether there's user on table or not (on login page). Then display the sign up page if no users found, else hide the sign up link. Or something like. Try your logics as well. Best Wishes!
It's redirecting to add category page and showing the error message failed to upload the image..when I was comment out the redirect the add category page was showing the warning that move_uploded_file failed to open stream.Could you help me why the move_uploaded_file function unable to move the image file from source to destination path?
You might have error either in your source path or your destination path. Please check that. If needed, watch the tutorial once again and compare the code. It might help you to find the error and fix it. Best Wishes!
@@VijayThapaSir Could I send you the screenshot to your email? Actually I checked thoroughly lots of time but failed to find the error.😔😔It will be very grateful for me.
@@VijayThapa Thanks for your response.I got the solution.Actually the file was in read mode.I change the permission of that file from read to read/write and it's working.😊
hi sir, thanks for this great tutorial. I've adjusted your code to upload file instead of image. but i have problem on how to display the file selected. can you help me sir?
If it's a pdf file, then you can display as following stackoverflow.com/questions/18040386/how-to-display-pdf-in-php else you'll have to create or embed document reader based on your file type. Best Wishes!
Thank you sir for this informative tutorial....Sir... I've stucked with a problem....i can't display the image on the manage category section....there is an outline of a box... because I've used width as 100px but there is no image displaying....what can i do for it ?
Is your image uploaded in the folder? Is the image_name saved in database? Is your image source path correct on manage-category section? Please check these first, and if needed watch the tutorial once again and compare the code. It might help you to find the error and fix it. Thanks and Regards!
Please help me, i'm blocked on 44:45, failed to upload image, I did all the same as in video, I watched 2 times tried to find the error but still no solution, i don't know what to do more, anyone can help me? Thank you
@@VijayThapa I resolved my problem, i just added ! to move_uploaded_files and it works, I see image in database but there is no image when i check ../images/category, why is that? Tnx
You’re welcome 😊 Hope you completed all the tutorials. And if you think the tutorials were helpful to you and can help others as well, then please SHARE with your family and friends. It helps this channel to GROW and your loved ones can also learn Web Development for FREE. Thanks and Regards!
Thank you so much. I'm really glad that you enjoyed the tutorials. And yes of course, there will be many other advanced courses. But it'll take some time as I'm a one man team with a full time work. So, Thank you so much for your love and support. Hope to see you on new courses. Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends. It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
hello sir, can you help me here if you have a time, i have inserted the title, featured and active sucessfully but my image is not inserting here, i have checked 5-7 times the whole code, but couldnt found any error. so please can you help me out. and one more thing you are good explainer. thanks jayant
Hi Jayant, Thank you so much for following the tutorials and hope it's helpful to you. for image, check following errors 1. have you set enctype in your form 2. are you getting image name on submit 3. are your source path and destination path correct Please check these places. If needed, watch the tutorial once again and compare the code. It might help you to find the errors and fix it. Best Wishes!
@@VijayThapa Hello sir, thanks for your response. so here yes i have set enctype and don't get the image name on submit when i click on add category it shows every time this message failed to upload image
Hello sir , on the part where you will upload an image mine were "Failed to Upload Image" it always like that , its not uploading i guess , ive rewatch it a tons of time and i dont have any mistakes and it is identical at your code . may i ask what could be tha problem? Thank you sir
The error might be one of the following 1. not adding -> enctype="multipart/form-data" 2. Not getting correct information on $_FILES[ ] 3. Incorrect Source Path or Destination Path 4. Improper If-Else Conditions due to improper indentations Please check these places. I cannot suggest you the exact solution without knowing your code. Best Wishes!
@@VijayThapa sorry for the inconveniences btw I've checked my code it has encrypte, the indention is correct , tha destination and source path is same as yours maybe the correct info on $_FILES but my code is same as yours . How do i check if i get the correct info on $_FILES is it on the part where you print($_FILES['image']) i did it too and it was same as yours , What could be the problem? Sorry if im bothering you and thank you are a big help.
@@mikayukinoshita7042 check the value for $_FILES['tmp_name']; And is your folder structure correct? I cannot give you exact solution without knowing your code. I can only suggest. Best Wishes!
@@VijayThapa yes , it is correct Thank you i guess ill just find a way Thank you thank you so much You have a educational content 👍 i love ir , i learned a lot
Hello Vijay, i hope you are well, I have tried all but no solution for broke image, when i add category i see always broken image and the images i have uploaded they aren't in the category folder, I've tried all, all, i was looking for it on google also but i can find nothing, i watched a few times this video tried to find my error but all is the same as your code, i'm desesperate :///
Then you might have error in your image upload code. Please check your source path, destination path and image upload code. If needed watch the tutorial once again, more sincerely and compare the code. It might help you to find the error and fix it. Best Wishes!
You may have error in you img src. Please check it once. Or your image may not have been added on database or not uploaded on images folder while adding. Please check them. If needed, watch the tutorial once again and compare the code. It may help you to find the error and fix it. Best Wishes!
Thank u Sir.but i have a problem add category..i recheck the code agian and again but it didnot work when i add category it is not added in data base and it didnot redirect me to manage admin .php page what to do?i watch ur tutorial again and agin but didnot work what to do
You might have error in your if-else statement for on SQL Query. Please check the code following the tutorial once again or email me at hi@vijaythapa.com with the screenshot of your error and code. Thanks and Regards!
Check whether the image is uploaded on on folder or not. Check if the image name is saved on database or not. And check the path of the image while displaying the image on "Manage Category" page. You might have error on any of these.
@@VijayThapai had this same issue sir i checked 2 times but i coudint find my error its saved on database with random name and also uploded in specified folder but its not showing please help me short this out
1. Is the picture uploaded on folder? 2. Is the image_name added on database? 3. Check thee path for your image name on manage-categories page. You might have error in these places. If needed watch the tutorial once again and compare the code. It might help you to find the error and fix it. Best Wishes!
I'm thankful for your tutorials and explanation sir. I do have a question for 53:01 . Since we are naming the file with random numbers. for the 0.1% chance of duplicate name (eg. 1st file is Food_Category_123.jpg but another Food_Category_123.jpg appeared), will the previous image be deleted then? As always I appreciate your explanation🙏
Yes, if the name becomes same then older image will be replaced. If you want to generate unique value forever, then you can use uniqid() function instead of random(). I just tried you to show the custom way to generate new name. Try uniqid www.php.net/manual/en/function.uniqid.php Best Wishes!
Hello sir , i have a problem regarding add category file. Sir my php code for add category is not responding for query execution and category add . I have checked it alot of times , even rewrote the code and matched it but its not responding . Please help. URGENT
33.05 it says undefined array key ‘Image’.. but my code is correct when i compare to yours. Print_r($_FILES[‘Image’]); I cant seem to find the error. Please help 🙏🏻
@@VijayThapa thanks a lott Sir... I really want to become a developer... And if I'll really become one I'll for sure tell you through the comment section in any video 😅🥰
@@shubhangimishra1865 I'm Sure you'll be. You're learning lots of skills like "Self Learning" and "Self Debugging" along with programming. Just have a little bit of Patience. Best Wishes!
I had a question regarding the login page. Lets assume that without Login the admin page doesn't opens . So, if after login in I delete admin from Manage admin page and now there is not a single admin and then i logout . And when i try to re-Login it ask for username and password of admin. but there is no admin so now am i stuck ?
There is something called MySQL Database and there you can add a user with Username and Password (MD5 encrypted) manually in your "tbl_users" table. That's why you need to know at least basic of database. Here's an article I wrote about changing password in database of Wordpress password and the process is similar for this project as well (just the table name is different) www.vijaythapa.com.np/2024/02/change-wordpress-website-password-without-email.html Best Wishes!
i have an issue with the add category page , it allows me to add once time only and it saves it into db. but when i try to add a new category the else condition is displayed ,, can u help me with that plz ?
First please check the code for add Category. If needed watch the tutorial once again and compare the code. It might help you to find the error and fix it. If you couldn't then email me at hi@vijaythapa.com with the screenshot of your error and code. Best Wishes!
@vijay thapa first thanks sir for your tutorial... sir my problem is images are uploading original files in category folder but in data base its showing like renamed i dont know what is wrong can you please help me on this
Then you may have error in your code (most probably on if-else statement). If needed, watch the tutorial once again and compare the code. It might help you to find the error and fix it. Best Wishes!
Then you might have error in your link. Either $image_name do not have value or your SITEURL constants' value is incorrect. Please check those. Best Wishes!
I had a problem when adding a new category. The issue was that it wouldn’t send as there was no image_name provided. I added a link in the sql query to include a blank image name and everything worked fine.
You might have error on link of the image to display on frontend. or Check whether the image is uploaded to the folder or not. If needed, watch the tutorial once again and compare the code. It might help you to find the error and fix it. Best Wishes!
Hello sir, How can we store images to show in that table when we actually deploy our project into production? When our users upload there images where should we keep them to use . Can you please explain this?
Everything remains same in production as well except the values on constants.php page. In database table we do not save the image. We only save the image name or path of the image. And save the physical image file on folder. Hope you understood. Thanks and Regards!
Is you image saved in database and file uploaded to folder? If yes, Check your img tag to display the image, you might have error there. If needed, watch the tutorial once again and compare the code. It might help you to find the error and fix it. Best Wishes!
51:17 I have a question. seting the image name like this, it couldn't bring the same issue that we are trying to solve? for example, the random number it's going to be a number between 000 and 999 but there is a probabilty that one number repeat eventually, and replace the image as well, the probabilty is low, but not 0, i apologize for my basic english. anyway amazing video, and tutorial, i've learn so much
With this method, I just wanted to show how to create custom names. To fix this issue, you can do one of the following 1. Use uniqid() function instead of rand(). It created Unique integer everytime 2. Instead of static name like "Food_Order_Website_rand_number.jpg" Use Title of the Food Like "Burger_Randon_Number.jpg" or "Pizza_Randon_Number.jpg" Hope you understood. Also try such on your own as well. Also Thank You So Much for following the tutorials. Hope they'e helpful to you. And if you think the tutorials could be helpful to others, then please SHARE with your family and friends. It helps this channel to GROW and your loved ones can also learn Web Development for FREE. Thanks and Regards!
@@VijayThapa That won't solve the issue , the easy way to do it is to take it from the ID number that already stored in the database of the Category , this way no-repeating will happen again in the future how long large your database is.
That won't solve the issue , the easy way to do it is to take it from the ID number that already stored in the database of the Category , this way no-repeating will happen again in the future how long large your database is.
Good day sir, when I tested the Select Image function (around 44:20) the website printed "Failed to Add Category" when I clicked the Add Category button. I checked my codes and I did not find any errors because it seemed identical to yours in the video. I would appreciate it very much if you could help me in debugging my code. I really want to complete this course, and learn from you sir. Thank you in advance :)
@@VijayThapa Yes sir, I have added the enctype data on the form bracket already before testing, but unfortunately it still doesnt work. So i'll just replay the video and re-do the codes instead to see if it will work this time. Thank you sir!
@@VijayThapa I've already debugged my code and it turns out that I have set the name of my data in tbl_category as "img_name" instead of "image_name." Which is why it did not reflect in the phpmyadmin. Thank you responding sir. Best wishes to you as well!
Hello,thank you for sharing knowledge.I only have problem with adding category.I did everything in the codes as in the video and I checked a couple of times, just nothing happens, it keeps printing me else message, that it failed.Can you explain to me what could be the problem?? Thanks!
Then you might have error either in your SQL Query or in if-else condition. Please watch the tutorial once again and compare the codes. It might help you to find the error and fix it. Best Wishes!
I made this course as easy as possible so that everyone can learn easily. So I didn't add that feature in this course. You can try using "fpdf" class to generate pdf receipts. Thanks and Regards!
hello, I'm facing an issue with displaying the image in the category.. it is only showing the image tag area but not the image. can you please help to rectify it..?
1. Check whether the image is uploaded on folder or not 2.Check whether the image_name is saved on database or not. 3. Check whether the image path is correct or not. If needed, watch the tutorial once again and compare the code. It might help you to find the error and fix it. Thanks and Regards!
sir I have a question here in add category : is $_files[image]['name'] always set ?? if it is, then why ??? because when even i do not chose the file it will also go if(isset($_files['image]['name']) condition why it happens please explain ????? but i think solution of this confusion as the $_files['image']['name'] contains string so whenever we do not chose the file it returns an empty string. is it like this what i said?? And if it is like that, even we do need to check $files['image']['name'] .
That's why we check whether the image name is empty or not. You can do that in the beginning as well. Like if($_FILES['image']['name'] != "") To simplify the code, I did it in multiple steps. Thanks and Regards!
@@VijayThapa thanks sir for your answer. So this is why else condition will not work ever as empty string is also a string , won't it ??? So isset($_FILES['image']['name'] )is always set.
@@VijayThapa sir I, have tried without clicking on upload image button else do not work . But if I use the condition like this if($_FILES['image']['name']!="") ,only then else condition work . But if I condition like this if(isset($_FILES['image']['name'])) , else will not work ever as $_FILES['image']['name'] is always set with empty or nonempty string .
Hello Mr thank you for this. I'm still learning PHP and database and your videoes help me a lot. Can I ask one question. Mr I wrote you same code for your lesson but in the browser write something data didn't add database. Codes same your code. Please Can your explain. Mistake here:$res=mysqli_query($conn, $sql); I wrote here or die (mysqli_error())); give me mistake Thanks
Hi, i uploaded the image but in my database it doesnt give me an image name and when i select featured or active it 0 in the database kindly help me sir
Then you might have an error in your code. Please watch the tutorial once again and compare the code. It might help you to find the error and fix it. Thanks and Regards!
@@VijayThapa hi i tried rewriting the code code 3 times now and its not working, the upload image part...in the add food part, it gives me an error message and in the category file i cant see the image but when i click a category like burgers its there. i don't understand where i have gone wrong even though i have rechecked the code a couple times
Check your code while looping the data. You might have error in your code. If needed, watch the tutorial once again and compare the code. It might help you to find the error and fix it. Thanks and Regards!
Sir kindly tell me how can i add image...i followed your code step by step by i am not able to add image...its shows failed to add...kindly help me i am stuck
How can I put a restriction about the admin to put an image? what I mean that the admin when he choose the file, he can select a word file or pdf or...etc
Check the following links stackoverflow.com/questions/3828554/how-to-allow-input-type-file-to-accept-only-image-files code-boxx.com/restrict-file-type-size-php-upload/ Best Wishes!
In the add category page when I add image to add category. it says Failed to upload image. so what is the soultion for this does anyone have a solution.....?!
There might be an error in your code. Please check that once. If needed, watch the tutorial once again and compare the code. It might help you to find the error and fix it. Thanks and Regards!
bro hi firsly thaks alot for course. its very helpful course for me We changed the name of the picture, but we used a random number for it. There is a possibility of getting the same number while using it. This probability will increase as the database grows. If the same number comes, how can I get an error? or wouldn't it be better if i do this with a loop
Yes, if the name becomes same then older image will be replaced. If you want to generate unique value forever, then you can use uniqid() function instead of random(). I just tried you to show the custom way to generate new name. Try uniqid www.php.net/manual/en/function.uniqid.php Best Wishes!
You get all of those images when you download the front-end project from the first episode. Link is in the description of first episode. Thanks and Regards!
Then you might have error in your SQL query, DB connection, etc. Please follow the tutorial once again and compare the codes. It might help you to find the bug and fix it. If you couldn't then let me know in the email hi@vijaythapa.com Thanks and Regards!
same here. Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs estaurant-website\admin\add-category.php:8)
@@VijayThapa i dont know ,i just get the yellow line meaning warning line. pls let me know so i can unlink the images if i delete category from images/category/. or if i dont want to use rename image, can i unlink if i delete category but i dont know the code, delete category is running but dont unlink the images/category the picture still there but erase in database. pls let me know thankyou vjay.
@@bebebela-d8h It seems like you've an error in removing the image. Please check the code once. If needed watch the tutorial once again and compare the code. It might help you to find the error and fix it. Or send me an email at hi@vijaythapa.com with the screenshot of your error and code.
It might be. Please check the SQL Query and if-else statement. If needed, watch the tutorial once again and compare the code. It might help you to find the error and fix it. Thanks and Regards!
At minute '33' it doesn't appear like yours. In mine after reloading the page the following message appears "Warning: Undefined array key" image "in C: \ xampp \ htdocs \ delivery \ admin \ adc-categoria.php on line 91".Is it correct or did I do something wrong?
You might have error in your code. Please check the name of your input field to select image. Watching the tutorial once again might help you to find the bug ad fix it. Best Wishes!
@@VijayThapa Thank you very much for your answer. Can you please guide me on how to name the foods in the MySQL database and how to call them in PHP for example .... Thank you very much for guiding me a little do. parsa.bahrambeik@gmail.com
@@parsabahrambeik4381 I did not understand your question completely. But I think if you watch all the tutorials of this course from the beginning, you will get your answer. Best Wishes!
uploading image not working and I wrote the code correctly I don't know what is the problem until the morning to evening trying to sole this problem if you please could help me how to solve
Please check your code once again. Mostly in your Add Category form. And check whether you've added name property for input type file or not. If needed, watch the tutorial once again and compare the code. It might help you to find the error and fix it. Best Wishes!
32:25 I am getting a warning Warning: Undefined array key "title" in C:\xampp\htdocs\food-order\admin\add-category.php on line 67 i have my checked the code, title is defined
Check your add-category form. Does it have "title" input form or not? If needed, watch the tutorial once again and compare the code. It might help you to find the error and fix it. Thanks and Regards!
Hello sir, thank you for your helpful videos. I face an issue on finding the image in category folder. The code is same, and the category and image is uploaded in database succesfully. But the image isn't visible in category folder
Then you might have missed something while uploading the image. Check your image destination path while uploading. Is your image uploaded on category folder or on images folder?
@@VijayThapa Sir I also have the same issue.I have checked multiple times there is no error in writing the destination path.But Sir still the category folder is empty. Its not showing anything.
@@shreyaseepatra1255 Then you might have missed something while uploading the image. Check your image destination path while uploading. Is your image uploaded on category folder or on images folder?
Please check whether 1. the images are uploaded in folder or not 2. image_name is saved in database or not 3. check the image path while displaying the image on manage_category If needed, watch the tutorial once again and compare the code. It might help you to find the error and fix it. Best Wishes!
Hello Vijay. Thank for the videos. I have a question though. My images wont upload. I always het a Failed to Upload Image. Even though I followed your code exactly how you wrote it. Please help.
Please check the code once again, you might have missed somethings like incorrect source path or destination or incorrect indentions, etc. If you couldn't find the error and fix it, then email me at hi@vijaythapa.com with screenshot of your error and code. Thanks and Regards!
Please check the code once again, you might have missed something. If needed, watch the tutorial once again and compare the code. It might help you to find the error and fix it. Best Wishes!
@@VijayThapa I saw the problem, since there is an image name column and we were not inserting it's value therefore the rest of data was not being queried
Thank you for your tutorial.but i have a problem, Everytime i try to add a category but i get "failed to add category". my code is correct. plz help me ......
Thank you so much for following the tutorials. Hope they're helpful to you. You might have error while getting the value or on your SQL query. So, please watch the tutorial once again and compare the code. It might help you to find the error and fix it. Best Wishes!
please help me with this .. it gives me Category added successfully but when I checked it on my database, the name of the image doesn't appear on my image_name .. I checked my code many times, but it doesn't work .. hope you can help me.. I literally stuck in this part ..
Really enjoying sir your this playlist I like it so much every thing is working fine and perfect but I have face one problem when my images showing in table on manage-category.php page it's can't show clearly it's just showing like that when some one have no internet or weak interested and the images showing like loading... Like screen reader how to fix this 😢 😢 I'm trying from last 2 hour but can't fix even I use chat gpt but same problem
You might have missed some code. Please watch the tutorial once again and compare the code. It might help you to find the error and fix it. Thanks and Regards!
Hello sir, I have one problem here that is when i add an category it gives me Category succesfully added msg but when i check my database eveything gets added execpt the image_name column in database remain null the name doesn't get adds? what should i do now? can you please respond as soon as possible as i have submit my project in a week.
Then please check your code on image uploading, whether image name is being sent or not. Also check your SQL Query. If needed, watch the tutorial once again and compare the code. It might help you to find the error and fix it. Best Wishes!
Hello it's me again mr. Vijay. 😁😁 i am here again to ask help lol.. i am having problem on displaying the image in my table... it only shows the broken image icon rather than displaying the real image... Do u have any suggestions?
Then, you've an error on adding image link. This is a minor issue. Try fixing by yourself. And when you're FREE read this blog as well dev.to/vijaythapa/don-t-ask-for-help-4pb7 Thanks and Regards!
@@VijayThapa oww Thankyou for always responding mr Vijay... Yes found my error on adding my image already and I've fixed it already.. Btw thank you for giving us free Tutorials 😁😁
@@VijayThapa My category has been added but image is not it's not showing any error but the image is not displayed in category and the name of image is not uploaded in table image_name plz help
Dear: When I try to implement an add-category I get this message : The page isn’t redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. This problem can sometimes be caused by disabling or refusing to accept cookies.when I tried to clear the cookies but the problem remained unresolved and it is the same with Chrome Explorer
I had an error on the explode method, it says "Only variables can be passed by reference" but when I run the code nothing went wrong. Anyone know how to solve this?
@Cherry Cottage 1.Your image might not have uploaded successfully. 2. You might have error on displaying the image at img tag. So, watch the tutorial once again and compare the code. It might help you to find the error and fix it. Best Wishes!
You are most welcome. I'm really glad that you enjoyed the course. Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends. It helps this channel to GROW and your loved ones can also learn Web Development for FREE. Thanks and Regards!
Hi sir Vijay Thapa, there is no error in all my code. I went back to your video to see and I compared all my code and your code. but in image_name is blank in sql, the other is not blank the title and featured / active. Please help me
Then there might be following errors 1. You might have forgotten to add "enctype" on your form tag 2. You might have forgotten to pass the value in your SQL query. 3. of some error in your if-else conditional structures. Thanks and Regards!
Thanks sir for responding to my comment. All perfectly fine sir in my code but image upload is the problem. The image didn't upload also in the folder I watched your video over and over until I got stuck at 40:40 because the image didn't go to image_name and wasn't uploaded to my "../image/ category /".$ image_name; Please help me sir. I just got an error in this video, in your video 1,2,3,4 all perfectly done but I only got stuck in your 5. Food Order Website with PHP and MySQL (Add and Display Category)
@@ar1shhhhhhhh Do you have spaces before and after category in your image path? "../image/ category /".$ image_name; This could be the problem, please check it and let me know. Also check whether you're getting correct image name with extension or not. Best Wishes!
Please check your SQL query. If needed, watch the tutorial once again and compare the code. It might help your to find the error and fix it. Best Wishes!
Yes, that's great. You can add it. Also if you can add Server Side Validation. I've shown a simple path for beginners. Rest is up to you. Make as advanced and secure as possible. It's a task for you. Best Wishes!
Did you add value in ? If you're saving "1 or 0" value, then you'll need to check for 1 or 0 instead of Yes/No on If-Else Condition. Hope you understood.
You might have error somewhere. Please check the code once. If needed watch the tutorial once again and compare the code. It might help you to find the error and fix it. Thanks and Regards!
Great master. Well understood. I will tell u i love ur style of teaching and handling things in software development .Thank u sir .
Thank You So Much @Emmy for your love and Support.
Best Wishes!
To those who are getting error at 27:19 just go to ur database and add the value of image to null....this worked for me
Hey buddy could you please elaborate. I need help
Thank you dr. It worked.
Thxxxxx❤
Thanks its help ,, but after that I can't upload photos???? maybe coz I put it Null??
i realy like how u keep on saying "thats it"
it gives off good vibes
thanks for this video series.
im on video 5 now. 8 more to go. planning to finish by this coming sunday.
I’m really glad that you’re enjoying the tutorials.
Also if you think the tutorials could be helpful to others, then please Share with your Family and Friends.
It helps this channel to Grow and your loved ones can also learn Web Development for Free.
Thanks and Regards!
I am here for my college project. But here I learn more than i know. Thank you sir ❤
I'm really glad that the course was helpful to you.
Thank you so much for following.
Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends.
It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
Thanks and Regards!
Hi sir! Thank you for this courses! It is amazing for me. U are great teacher. Good bless you!
I'm really glad that the tutorials were helpful to you.
Hope you completed all the tutorials.
Also if you think the tutorials could be helpful to others as well, then please SHARE with your family and friends.
It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
Thanks and Regards!
Hi brother. Thank you for this course. It is a great learning for me. And by watching I am doing my minor project🙂🙂
I'm really glad that the course is helpful to you.
Best Wishes on your course.
Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends.
It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
Thanks and Regards!
Thanks so much ma mentor really i didn't find somone he explain things by easy and awsome way like u 💛💚❤️ on youtube 😘😘😘😘 i hope u to go a head ♥️♥️♥️😚
I'm really glad that the tutorials were helpful to you.
Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends.
It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
Thanks and Best Wishes!
I want tot ask, why in the href in a tag we print the SITE_URL and write all the path although we can write the name of page that we want to go to it ?
00:04:47
Please read this article and decide
moz.com/blog/relative-vs-absolute-urls-whiteboard-friday
Best Wishes!
@Vijay Thapa Thank you for your tutorials Sir. It really help us a lot.
Keep safe
I'm really glad that the tutorials were helpful to you.
Hope you completed all the tutorials.
Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends.
It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
Thanks and Regards!
Stay Safe.
@@VijayThapa I will share this to others sir.
Best wishes!
Hello sir, i have two problems.. if i ad $sn++ and get value to 1 like u on 1:05:02, after that i implement it on p tag and it stays on value 1 on every new row.. and second if i add category without image it will add $image_name value/name food_category_(number from 000 to 999) without dot and end (png,jpg...) but i do it like you with if(...)... else {$image_name = " "} can someone help me? thanks a lot 🥂
second thing with image_name is fixed with your next tutorial but increasing numbers are still not working ://
$sn++ should be inside while loop.
Please check that.
If needed, watch the tutorial once again and compare the code.
It might help you to find the errors and fix it.
Best Wishes!
Sir at 47:00 on line 116 i.e., $ext I'm getting error like only variables can be passed by reference PHP(PHP1401).. please resolve it sir . Due to this error I'm not getting images on website and also imagename is not updated in database. Thankyou
That's just a warning.
If the feature is not working for you, then you may have some other errors.
Please check your code once.
If needed, watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Best Wishes!
@@VijayThapa no sir. I've been struggling with this issue from past 3 days. The warning is gone but the image is not uploading. Image name is not visible in the database also. Please provide a solution sir. Thankyou
@@721SreejaGopishetty Then you have an error while uploading the image.
Please check your code once.
If needed, watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Best Wishes!
You are master sir !, I stopped in stage 6 because I want to try to create my own.
Thank You So Much for following the tutorial.
And I'm really glad that you enjoyed the course and I also support doing your own projects.
Let me know if there's anything I can help you with.
Also if you think the tutorials could e helpful to others, then please SHARE with your family and friends.
It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
Thanks and Regards!
You are a wonderful teacher !!! Keep it up.sir
Thanks a ton for following the course. And I'm really glad that the course was helpful to you.
Also if you think they can be helpful to others, then please SHARE with your family and friends.
It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
Best Wishes!
Yo are Great Teacher Sir, I follow ur course until this video and will continue till the end session, u give me so much knowledge :)
I'm really glad that the tutorials were helpful to you.
Hope you'll complete all the tutorials soon.
Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends.
It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
Thanks and Regards!
Very helpful Video 👍
Thank you so much.
I'm really glad that the tutorials were helpful to you.
Hope you complete all tutorials soon.
Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends.
It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
Best Wishes!
Sir! 51:17 at line 119 you have an issue of repeating especially when you have a large database , the solution to solve the issue is to take it from the auto-incremented ID number that already stored in the database of the Category , this will make no-repeating again in the future how long large your database is.
Yes, that's other way.
And you can also use UUID instead of random integer.
Thanks and Regards!
Thank you for another great lesson sir!
You're welcome and I'm really glad that the tutorials are helpful to you.
Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends.
It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
Thanks and Regards!
Sir, I cant seem to upload images and it says Undefined array key "tmp-name" as well as Undefined array key "image". I already put a name="image" in the input tag. I cant tell whats the problem
Nvm, its been solved due to typos 🤡
Awesome 👏
Hope you complete all the tutorials soon.
@@VijayThapa Thanks sir
Thank you master you save me to my project
You're always welcome.
I'm really glad that the course was helpful to you.
It showed me ''failed to add category, because image_name didn't fill, I had to change in database that 'image_name' can be Null data, and then it works.
Okay that's nice.
You can either do that.
Or add the default image name when image is not selected.
I'm really glad that you tried your own solution.
It helps you to develop problem solving and debugging skill in you, which is one of the must have skill among the senior developers.
Thanks and Regards!
Nice work!
That was the problem for me too
Thanks
@@VijayThapa Thank you Sir, you are a great teacher. With you i can learn so much of stuffs. Really impresive how easy you are teaching us ❤️
@@Aleksandar-hm8nf I'm really glad that you enjoyed the course.
Thank you so much for following the tutorials.
Also if you think they could be helpful to others, then please SHARE with your family and friends.
It helps this channel to GROW and your loved ones can also learn Web/Software Development for FREE.
Thanks and Regards!
Hey could you please help me with this?
Love you sir😍😍😍
Thank you so much.
I'm really glad that you're enjoying the course.
Hope you complete all the tutorials soon.
Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends.
It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
Thanks and Regards!
Thanks sir . But i have problem add category and displaying, image isni't displaying also update category how i can sovle this plz 🙏
Is your image name saved in database?
An image uploaded into folder?
Please check those, if they're correct then you may have error on displaying the image code.
Else you may have error in uploading the image.
Best Wishes!
Thank you ❤ successfully completed video 5.
That's Awesome.
Hope you complete all tutorials soon.
Best Wishes!
Hi sir, thank you for this. I'm still learning PHP and database and your videos help me a lot. Sir can I request for the full source code of this project?
Sir i have a doubt....that before making the login page you have set the username and password in manage admin.....so is there should not somethig like sign up for news ones
Yes, you can try.
It's similar to "add-admin".
Simple logic.
When project is first launched, check whether there's user on table or not (on login page).
Then display the sign up page if no users found, else hide the sign up link.
Or something like.
Try your logics as well.
Best Wishes!
We love you man❤
Thank you so much.
Hope you completed all the tutorials and was helpful to you.
Best Wishes!
It's redirecting to add category page and showing the error message failed to upload the image..when I was comment out the redirect the add category page was showing the warning that move_uploded_file failed to open stream.Could you help me why the move_uploaded_file function unable to move the image file from source to destination path?
If anyone is reading this comment and know the problem where I did mistake please help me to figure out.
You might have error either in your source path or your destination path.
Please check that.
If needed, watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Best Wishes!
@@VijayThapaSir Could I send you the screenshot to your email? Actually I checked thoroughly lots of time but failed to find the error.😔😔It will be very grateful for me.
@@VijayThapa Thanks for your response.I got the solution.Actually the file was in read mode.I change the permission of that file from read to read/write and it's working.😊
@@TarjiFarhatunDuchess That's Awesome.
Hope you'll complete all the tutorials soon.
Best Wishes!
hi sir, thanks for this great tutorial. I've adjusted your code to upload file instead of image. but i have problem on how to display the file selected. can you help me sir?
If it's a pdf file, then you can display as following
stackoverflow.com/questions/18040386/how-to-display-pdf-in-php
else you'll have to create or embed document reader based on your file type.
Best Wishes!
Thank you sir for this informative tutorial....Sir... I've stucked with a problem....i can't display the image on the manage category section....there is an outline of a box... because I've used width as 100px but there is no image displaying....what can i do for it ?
Is your image uploaded in the folder?
Is the image_name saved in database?
Is your image source path correct on manage-category section?
Please check these first, and if needed watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Thanks and Regards!
Please help me, i'm blocked on 44:45, failed to upload image, I did all the same as in video, I watched 2 times tried to find the error but still no solution, i don't know what to do more, anyone can help me? Thank you
Then you either might not be getting image name or your destination and source path is incorrect.
please check those.
@@VijayThapa Hello, I'm on Mac, maybe it's different, maybe my source isn't good. I don't know what to put, no solution :(
@@VijayThapa I resolved my problem, i just added ! to move_uploaded_files and it works, I see image in database but there is no image when i check ../images/category, why is that? Tnx
@@MrSTEFFKE You forgot "/" after category, so your images might be inside "images" folder.
@@VijayThapa Thank you for your response Sir. Sorry, I did it but still there is nothing
Thank you 🙂
You’re welcome 😊
Hope you completed all the tutorials.
And if you think the tutorials were helpful to you and can help others as well, then please SHARE with your family and friends.
It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
Thanks and Regards!
@Vijay Thapa i want to ask for category featured and active when i click no why my database there show featured show on and active show yes?
@Vijay Thapa what is my problem?
Check your HTML code for featured.
Did you pass the values?
@@VijayThapa can already thanks you
Wow! you're the best 🙂
Are you planning to upload any other tutorial
Thank you so much.
I'm really glad that you enjoyed the tutorials.
And yes of course, there will be many other advanced courses.
But it'll take some time as I'm a one man team with a full time work.
So, Thank you so much for your love and support.
Hope to see you on new courses.
Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends.
It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
@@VijayThapaquality takes time and i will definitely share this playlist 🙂
@@poseidon5602 Thank You So Much.
Means a lot to me.
hello sir, can you help me here if you have a time, i have inserted the title, featured and active sucessfully but my image is not inserting here, i have checked 5-7 times the whole code, but couldnt found any error. so please can you help me out. and one more thing you are good explainer. thanks jayant
Hi Jayant,
Thank you so much for following the tutorials and hope it's helpful to you.
for image, check following errors
1. have you set enctype in your form
2. are you getting image name on submit
3. are your source path and destination path correct
Please check these places.
If needed, watch the tutorial once again and compare the code.
It might help you to find the errors and fix it.
Best Wishes!
@@VijayThapa Hello sir,
thanks for your response. so here yes i have set enctype and don't get the image name on submit when i click on add category it shows every time this message failed to upload image
@@aictworld3182 Then check the tutorial on fix "Getting Image Name" after submit.
Without Image Name, Image upload will fail always.
@@VijayThapa yes now I cleared the mistakes it was just silly mistake not applied underscores in post method. thanks sir
Hello sir , on the part where you will upload an image mine were "Failed to Upload Image" it always like that , its not uploading i guess , ive rewatch it a tons of time and i dont have any mistakes and it is identical at your code . may i ask what could be tha problem? Thank you sir
The error might be one of the following
1. not adding -> enctype="multipart/form-data"
2. Not getting correct information on $_FILES[ ]
3. Incorrect Source Path or Destination Path
4. Improper If-Else Conditions due to improper indentations
Please check these places.
I cannot suggest you the exact solution without knowing your code.
Best Wishes!
@@VijayThapa sorry for the inconveniences btw I've checked my code it has encrypte, the indention is correct , tha destination and source path is same as yours maybe the correct info on $_FILES but my code is same as yours . How do i check if i get the correct info on $_FILES is it on the part where you print($_FILES['image'])
i did it too and it was same as yours ,
What could be the problem?
Sorry if im bothering you and thank you are a big help.
@@mikayukinoshita7042 check the value for $_FILES['tmp_name'];
And is your folder structure correct?
I cannot give you exact solution without knowing your code. I can only suggest.
Best Wishes!
@@VijayThapa yes , it is correct Thank you i guess ill just find a way Thank you thank you so much You have a educational content 👍 i love ir , i learned a lot
@@mikayukinoshita7042 please help me too I think that I got the same error
Hello Vijay, i hope you are well, I have tried all but no solution for broke image, when i add category i see always broken image and the images i have uploaded they aren't in the category folder, I've tried all, all, i was looking for it on google also but i can find nothing, i watched a few times this video tried to find my error but all is the same as your code, i'm desesperate :///
Then you might have error in your image upload code.
Please check your source path, destination path and image upload code.
If needed watch the tutorial once again, more sincerely and compare the code. It might help you to find the error and fix it.
Best Wishes!
VijayThapa, please, my image is showing a square ⬜ without the image on the manager category. Can you please help me out?
You may have error in you img src.
Please check it once.
Or your image may not have been added on database or not uploaded on images folder while adding.
Please check them.
If needed, watch the tutorial once again and compare the code. It may help you to find the error and fix it.
Best Wishes!
@@VijayThapa the image are added into the database
But if I click on update category the image will be showing over there
@@VijayThapa the image are added into the database
But if I click on update category the image will be showing over there
@@Norshi-AmegborBismark-bo4vb Then check your img tag, where you're displaying the image.
Thank u Sir.but i have a problem add category..i recheck the code agian and again but it didnot work when i add category it is not added in data base and it didnot redirect me to manage admin .php page what to do?i watch ur tutorial again and agin but didnot work what to do
You might have error in your if-else statement for on SQL Query.
Please check the code following the tutorial once again or email me at hi@vijaythapa.com with the screenshot of your error and code.
Thanks and Regards!
why need featured radio button in add category page?
Please follow the tutorials till episode-09, you'll know.
Thanks and Regards!
@@VijayThapa thank you
Hii brother, my image is not showing on manage-category page I have recheck the code i did not find any error. can you help?
Check whether the image is uploaded on on folder or not.
Check if the image name is saved on database or not.
And check the path of the image while displaying the image on "Manage Category" page.
You might have error on any of these.
@@VijayThapai had this same issue sir i checked 2 times but i coudint find my error its saved on database with random name and also uploded in specified folder but its not showing please help me short this out
@amman578 bro please let me know what is the error of htat
@@nagarajcompu Then, Please check your tag on manage-category page.
You may have error on your image path.
and probably rewatch these several times to absorb the knowledge :V
That's the best thing to do in order to understand in depth.
Also google the terms you're confused in.
Best Wishes!
Can you help my pictures don't add on my folder and I don't know whats wrong + they don't show on the webpage of categories
1. Is the picture uploaded on folder?
2. Is the image_name added on database?
3. Check thee path for your image name on manage-categories page.
You might have error in these places.
If needed watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Best Wishes!
I'm thankful for your tutorials and explanation sir. I do have a question for 53:01 . Since we are naming the file with random numbers. for the 0.1% chance of duplicate name (eg. 1st file is Food_Category_123.jpg but another Food_Category_123.jpg appeared), will the previous image be deleted then? As always I appreciate your explanation🙏
Yes, if the name becomes same then older image will be replaced.
If you want to generate unique value forever, then you can use uniqid() function instead of random().
I just tried you to show the custom way to generate new name.
Try uniqid
www.php.net/manual/en/function.uniqid.php
Best Wishes!
@@VijayThapa Thank you very much sir!
I have a problem with my code it won't even a category what could be the problem?
Hello sir , i have a problem regarding add category file. Sir my php code for add category is not responding for query execution and category add . I have checked it alot of times , even rewrote the code and matched it but its not responding . Please help. URGENT
Email me at hi@vijaythapa.com with the screenshot of your error and code.
@@VijayThapa It's working now sir, thanks for your response.
can we give "required" attribute to the radio input type instead checking whether it is clicked or not using php?
Yes, you can do that as well.
But not all radio buttons need to be required.
Best Wishes!
33.05 it says undefined array key ‘Image’.. but my code is correct when i compare to yours. Print_r($_FILES[‘Image’]);
I cant seem to find the error. Please help 🙏🏻
Check the name of your input file.
Is it image or Image?
hey m also facing the same problem
Hello sir.. I have an error in add-category.php."cannot modify header information-header already sent by(....)"
At the top of 'constants.php' add following code
ob_start();
Thanks and Regards!
@@VijayThapa thanku sir
On 44:23 mine is showing "Failed to Upload Image" 🙄
Sorry... My mistake. I wrote temp instead of tmp😅
Best Wishes!
You're learning to Self-Debug. That's a great skill for a developer.
@@VijayThapa thanks a lott Sir... I really want to become a developer... And if I'll really become one I'll for sure tell you through the comment section in any video 😅🥰
@@shubhangimishra1865 I'm Sure you'll be.
You're learning lots of skills like "Self Learning" and "Self Debugging" along with programming.
Just have a little bit of Patience.
Best Wishes!
@@VijayThapa thank u so much Sir for ur best wishes..
I had a question regarding the login page. Lets assume that without Login the admin page doesn't opens . So, if after login in I delete admin from Manage admin page and now there is not a single admin and then i logout . And when i try to re-Login it ask for username and password of admin. but there is no admin so now am i stuck ?
There is something called MySQL Database and there you can add a user with Username and Password (MD5 encrypted) manually in your "tbl_users" table.
That's why you need to know at least basic of database.
Here's an article I wrote about changing password in database of Wordpress password and the process is similar for this project as well (just the table name is different)
www.vijaythapa.com.np/2024/02/change-wordpress-website-password-without-email.html
Best Wishes!
i have an issue with the add category page , it allows me to add once time only and it saves it into db. but when i try to add a new category the else condition is displayed ,, can u help me with that plz ?
First please check the code for add Category. If needed watch the tutorial once again and compare the code. It might help you to find the error and fix it.
If you couldn't then email me at hi@vijaythapa.com with the screenshot of your error and code.
Best Wishes!
@vijay thapa first thanks sir for your tutorial... sir my problem is images are uploading original files in category folder but in data base its showing like renamed i dont know what is wrong can you please help me on this
Then you may have error in your code (most probably on if-else statement).
If needed, watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Best Wishes!
sir help me on this:
Then you might have error in your link.
Either $image_name do not have value or your SITEURL constants' value is incorrect.
Please check those.
Best Wishes!
I have the same problem. Did you solve it?
I have the same error too, please help
thank you very much
You are welcome
I had a problem when adding a new category. The issue was that it wouldn’t send as there was no image_name provided. I added a link in the sql query to include a blank image name and everything worked fine.
Hope you fixed the error.
u are the best...but i have some problem with image icon showing but
not displaying the image
You might have error on link of the image to display on frontend.
or Check whether the image is uploaded to the folder or not.
If needed, watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Best Wishes!
Hello sir,
How can we store images to show in that table when we actually deploy our project into production?
When our users upload there images where should we keep them to use .
Can you please explain this?
Everything remains same in production as well except the values on constants.php page.
In database table we do not save the image. We only save the image name or path of the image.
And save the physical image file on folder.
Hope you understood.
Thanks and Regards!
sir i have added category successfully everything is ok but my real image not shown it shows default image
Is you image saved in database and file uploaded to folder?
If yes,
Check your img tag to display the image, you might have error there.
If needed, watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Best Wishes!
@@VijayThapa ok sir sure
51:17 I have a question.
seting the image name like this, it couldn't bring the same issue that we are trying to solve? for example, the random number it's going to be a number between 000 and 999 but there is a probabilty that one number repeat eventually, and replace the image as well, the probabilty is low, but not 0, i apologize for my basic english. anyway amazing video, and tutorial, i've learn so much
With this method, I just wanted to show how to create custom names.
To fix this issue, you can do one of the following
1. Use uniqid() function instead of rand().
It created Unique integer everytime
2. Instead of static name like "Food_Order_Website_rand_number.jpg"
Use Title of the Food
Like "Burger_Randon_Number.jpg" or "Pizza_Randon_Number.jpg"
Hope you understood. Also try such on your own as well.
Also Thank You So Much for following the tutorials.
Hope they'e helpful to you.
And if you think the tutorials could be helpful to others, then please SHARE with your family and friends.
It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
Thanks and Regards!
@@VijayThapa That won't solve the issue , the easy way to do it is to take it from the ID number that already stored in the database of the Category , this way no-repeating will happen again in the future how long large your database is.
That won't solve the issue , the easy way to do it is to take it from the ID number that already stored in the database of the Category , this way no-repeating will happen again in the future how long large your database is.
Good day sir, when I tested the Select Image function (around 44:20) the website printed "Failed to Add Category" when I clicked the Add Category button. I checked my codes and I did not find any errors because it seemed identical to yours in the video. I would appreciate it very much if you could help me in debugging my code. I really want to complete this course, and learn from you sir. Thank you in advance :)
The data also doesn't reflect on tbl_category :( im trying to find the cause of the error though
Check your add category form.
Did you add enctype property correctly on your form.
And then check the code once again.
Thanks and Regards!
@@VijayThapa Yes sir, I have added the enctype data on the form bracket already before testing, but unfortunately it still doesnt work. So i'll just replay the video and re-do the codes instead to see if it will work this time. Thank you sir!
@@MRjulz178 Best Wishes!
@@VijayThapa I've already debugged my code and it turns out that I have set the name of my data in tbl_category as "img_name" instead of "image_name." Which is why it did not reflect in the phpmyadmin. Thank you responding sir. Best wishes to you as well!
Hello,thank you for sharing knowledge.I only have problem with adding category.I did everything in the codes as in the video and I checked a couple of times, just nothing happens, it keeps printing me else message, that it failed.Can you explain to me what could be the problem?? Thanks!
Then you might have error either in your SQL Query or in if-else condition.
Please watch the tutorial once again and compare the codes.
It might help you to find the error and fix it.
Best Wishes!
Hey have your problem? I m facing same problem. If you have corrected it then please help me. i m stuck!!
@@VijayThapa I have the same error could you please help! I watched the video 5 times and still, I can't find the solution.
I had the same problem, then when I added "image_name", it worked. I think we need to give this attribution a value or set it to can be null.
Sir, how about printing a receipt pretending to be a food restaurant or sample food business itself, Thank you..
I made this course as easy as possible so that everyone can learn easily.
So I didn't add that feature in this course.
You can try using "fpdf" class to generate pdf receipts.
Thanks and Regards!
hello, I'm facing an issue with displaying the image in the category.. it is only showing the image tag area but not the image.
can you please help to rectify it..?
1. Check whether the image is uploaded on folder or not
2.Check whether the image_name is saved on database or not.
3. Check whether the image path is correct or not.
If needed, watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Thanks and Regards!
i have a same problem sir
I have the same problem .. could you help me
sir I have a question here in add category : is $_files[image]['name'] always set ?? if it is, then why ??? because when even i do not chose the file it will also go if(isset($_files['image]['name']) condition why it happens please explain ?????
but i think solution of this confusion as the $_files['image']['name'] contains string so whenever we do not chose the file it returns an empty string. is it like this what i said?? And if it is like that, even we do need to check $files['image']['name'] .
That's why we check whether the image name is empty or not.
You can do that in the beginning as well.
Like
if($_FILES['image']['name'] != "")
To simplify the code, I did it in multiple steps.
Thanks and Regards!
@@VijayThapa thanks sir for your answer. So this is why else condition will not work ever as empty string is also a string , won't it ???
So isset($_FILES['image']['name'] )is always set.
@@akramsarkar7008 Try adding the category without clicking on Upload Image Button when else is removed and Let me know.
@@VijayThapa sir I, have tried without clicking on upload image button else do not work . But if I use the condition like this if($_FILES['image']['name']!="") ,only then else condition work . But if I condition like this if(isset($_FILES['image']['name'])) , else will not work ever as $_FILES['image']['name'] is always set with empty or nonempty string .
@@akramsarkar7008 email me at hi@vijaythapa.com with the screenshot of your error and code.
Thanks and Regards!
Hello Mr thank you for this. I'm still learning PHP and database and your videoes help me a lot. Can I ask one question. Mr I wrote you same code for your lesson but in the browser write something data didn't add database. Codes same your code. Please Can your explain. Mistake here:$res=mysqli_query($conn, $sql); I wrote here or die (mysqli_error())); give me mistake
Thanks
What error do you get?
Try adding $conn inside mysqli_error().
Like
mysqli_error($conn);
Thanks and Regards!
@@VijayThapa Thanks really many help me...
Hi, i uploaded the image but in my database it doesnt give me an image name and when i select featured or active it 0 in the database kindly help me sir
Then you might have an error in your code.
Please watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Thanks and Regards!
@@VijayThapa okay thanks
@@VijayThapa hi i tried rewriting the code code 3 times now and its not working, the upload image part...in the add food part, it gives me an error message and in the category file i cant see the image but when i click a category like burgers its there. i don't understand where i have gone wrong even though i have rechecked the code a couple times
@@VijayThapa and should the source path of the images be inside the project folder
Hi sir
When I add a category, only one is displayed even though there is a lot of data in the database.
Check your code while looping the data.
You might have error in your code.
If needed, watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Thanks and Regards!
Sir kindly tell me how can i add image...i followed your code step by step by i am not able to add image...its shows failed to add...kindly help me i am stuck
Please email me at hi@vijaythapa.com with the screenshot of your error message and the code.
Thanks and Regards!
@@VijayThapa ok sir I will message you.....
Done check email
@@VijayThapa check email
How can I put a restriction about the admin to put an image?
what I mean that the admin when he choose the file, he can select a word file or pdf or...etc
Check the following links
stackoverflow.com/questions/3828554/how-to-allow-input-type-file-to-accept-only-image-files
code-boxx.com/restrict-file-type-size-php-upload/
Best Wishes!
@@VijayThapa Thanks Mr. THapa the links you sent are benifit.
In the add category page
when I add image to add category.
it says Failed to upload image.
so what is the soultion for this
does anyone have a solution.....?!
There might be an error in your code.
Please check that once.
If needed, watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Thanks and Regards!
@@VijayThapa its fixed, Anyway Thanks for u classes...its very helpful for students like me....
Tnx....!
bro hi firsly thaks alot for course. its very helpful course for me
We changed the name of the picture, but we used a random number for it. There is a possibility of getting the same number while using it. This probability will increase as the database grows. If the same number comes, how can I get an error? or wouldn't it be better if i do this with a loop
Yes, if the name becomes same then older image will be replaced.
If you want to generate unique value forever, then you can use uniqid() function instead of random().
I just tried you to show the custom way to generate new name.
Try uniqid
www.php.net/manual/en/function.uniqid.php
Best Wishes!
Can u explain me why u used die() in image upload here....why did we not use in add admin page??
Because we don't want to SAVE the data in database if image is not uploaded first.
Are we uploading image for admin?
can you please give me the image at 32.53 ? i did not found them at the other links
You get all of those images when you download the front-end project from the first episode.
Link is in the description of first episode.
Thanks and Regards!
I've been following your playlist it was really cool, but my category isn't added if condition isn't working, I've compare all the codes properly.
Then you might have error in your SQL query, DB connection, etc.
Please follow the tutorial once again and compare the codes. It might help you to find the bug and fix it.
If you couldn't then let me know in the email
hi@vijaythapa.com
Thanks and Regards!
@@VijayThapa okay thank you for your time.
@@bikashkoirala2367 Hey have your problem? I m facing same problem. If you have corrected it then please help me. i m stuck!!
same here. Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs
estaurant-website\admin\add-category.php:8)
why my code in $ext= end(explode('.', $image_name));
get warning said "only variable can passed by reference
pls help me
You might have more error message.
Please let me know.
@@VijayThapa i dont know ,i just get the yellow line meaning warning line.
pls let me know so i can unlink the images if i delete category from images/category/. or if i dont want to use rename image, can i unlink if i delete category but i dont know the code, delete category is running but dont unlink the images/category the picture still there but erase in database. pls let me know thankyou vjay.
@@bebebela-d8h It seems like you've an error in removing the image.
Please check the code once.
If needed watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Or send me an email at hi@vijaythapa.com with the screenshot of your error and code.
i will try again first
@@VijayThapa thanks vjay
Hi, i have a problem: When i try to add category (in part Add Category), i have only 'else' message. is it problem with sql query?
It might be.
Please check the SQL Query and if-else statement.
If needed, watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Thanks and Regards!
At minute '33' it doesn't appear like yours. In mine after reloading the page the following message appears "Warning: Undefined array key" image "in C: \ xampp \ htdocs \ delivery \ admin \ adc-categoria.php on line 91".Is it correct or did I do something wrong?
You might have error in your code. Please check the name of your input field to select image.
Watching the tutorial once again might help you to find the bug ad fix it.
Best Wishes!
Hello, do you have the name and price of all the dishes on the menu; Should they have a field in the MySQL database? Thanks
The name and price of the dishes can be added/updated/deleted. And all the data are saved in Database.
Thanks and Regards!
@@VijayThapa Thank you very much for your answer. Can you please guide me on how to name the foods in the MySQL database and how to call them in PHP for example .... Thank you very much for guiding me a little do.
parsa.bahrambeik@gmail.com
@@parsabahrambeik4381 I did not understand your question completely.
But I think if you watch all the tutorials of this course from the beginning, you will get your answer.
Best Wishes!
@@VijayThapa Just tell me if I should create a field name and price for all the foods in the MySQL database based on the number of foods available.
@@parsabahrambeik4381 Yes, those fields are needed. But we have already created every columns, table and database for this project on first episode.
uploading image not working and I wrote the code correctly I don't know what is the problem until the morning to evening trying to sole this problem if you please could help me how to solve
Please check your code once again.
Mostly in your Add Category form.
And check whether you've added name property for input type file or not.
If needed, watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Best Wishes!
32:25
I am getting a warning
Warning: Undefined array key "title" in C:\xampp\htdocs\food-order\admin\add-category.php on line 67
i have my checked the code, title is defined
Check your add-category form.
Does it have "title" input form or not?
If needed, watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Thanks and Regards!
Hello sir, thank you for your helpful videos. I face an issue on finding the image in category folder. The code is same, and the category and image is uploaded in database succesfully. But the image isn't visible in category folder
Then you might have missed something while uploading the image.
Check your image destination path while uploading.
Is your image uploaded on category folder or on images folder?
@@VijayThapa Sir I also have the same issue.I have checked multiple times there is no error in writing the destination path.But Sir still the category folder is empty. Its not showing anything.
@@VijayThapa i have the same issue please help
@@shreyaseepatra1255 Then you might have missed something while uploading the image.
Check your image destination path while uploading.
Is your image uploaded on category folder or on images folder?
Hi sir , images are not displyed in manage category . What can i do ?
Please check whether
1. the images are uploaded in folder or not
2. image_name is saved in database or not
3. check the image path while displaying the image on manage_category
If needed, watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Best Wishes!
Hello Vijay. Thank for the videos. I have a question though. My images wont upload. I always het a Failed to Upload Image. Even though I followed your code exactly how you wrote it. Please help.
Please check the code once again, you might have missed somethings like incorrect source path or destination or incorrect indentions, etc.
If you couldn't find the error and fix it, then email me at hi@vijaythapa.com with screenshot of your error and code.
Thanks and Regards!
Same error I have!!
Have you got the error in code
@@sachinpoonia4989 did you fix the error??
14:02 Started php to add data in database
Best Wishes!
@@VijayThapa Thank You very much by the way your course is helping me a lot thanks again
i have added the sql statement but when I executed the query it seams that it is not executed,what might be the problem?
Please check the code once again, you might have missed something.
If needed, watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Best Wishes!
@@VijayThapa I saw the problem, since there is an image name column and we were not inserting it's value therefore the rest of data was not being queried
@@nickleydeonyango1704 That's awesome. Hope you fixed it now.
Best Wishes!
Thank you for your tutorial.but i have a problem,
Everytime i try to add a category but i get "failed to add category".
my code is correct.
plz help me ......
Thank you so much for following the tutorials.
Hope they're helpful to you.
You might have error while getting the value or on your SQL query.
So, please watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Best Wishes!
hello sir Vijay Thapa. im putting
I think after category, you've missed '/'
try this $destination_path="../images/category/".$image_name; (In you add-category.php page :)
@@livingworld5621 still not showing an image?
i am facing same problem
The same problem for me, did you solve it?
please help me with this .. it gives me Category added successfully but when I checked it on my database, the name of the image doesn't appear on my image_name .. I checked my code many times, but it doesn't work .. hope you can help me.. I literally stuck in this part ..
Please email me at hi@vijaythapa.com with the screenshot of your error and the code.
Thanks and Regards!
Really enjoying sir your this playlist I like it so much every thing is working fine and perfect but I have face one problem when my images showing in table on manage-category.php page it's can't show clearly it's just showing like that when some one have no internet or weak interested and the images showing like loading... Like screen reader how to fix this 😢 😢 I'm trying from last 2 hour but can't fix even I use chat gpt but same problem
Please email me at hi@vijaythapa.com with the screenshot of your error and code.
hello, when i try to display my image in the table it doesn't appear just an image logo what should i do?
You might have missed some code.
Please watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Thanks and Regards!
Hello sir, I have one problem here that is when i add an category it gives me Category succesfully added msg but when i check my database eveything gets added execpt the image_name column in database remain null the name doesn't get adds? what should i do now? can you please respond as soon as possible as i have submit my project in a week.
Then please check your code on image uploading, whether image name is being sent or not.
Also check your SQL Query.
If needed, watch the tutorial once again and compare the code. It might help you to find the error and fix it.
Best Wishes!
@@VijayThapa OK sir
Hello it's me again mr. Vijay. 😁😁 i am here again to ask help lol.. i am having problem on displaying the image in my table... it only shows the broken image icon rather than displaying the real image... Do u have any suggestions?
Then, you've an error on adding image link.
This is a minor issue. Try fixing by yourself.
And when you're FREE read this blog as well
dev.to/vijaythapa/don-t-ask-for-help-4pb7
Thanks and Regards!
@@VijayThapa oww Thankyou for always responding mr Vijay... Yes found my error on adding my image already and I've fixed it already.. Btw thank you for giving us free Tutorials 😁😁
@ElSatan hey i am having the same problem , ive wachted sooo many times. How did you fixed ur problem
Hi man, im having same issue. how did u fix it?
@@VijayThapa
My category has been added but image is not it's not showing any error but the image is not displayed in category and the name of image is not uploaded in table image_name plz help
Dear: When I try to implement an add-category I get this message :
The page isn’t redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
This problem can sometimes be caused by disabling or refusing to accept cookies.when I tried to clear the cookies but the problem remained unresolved and it is the same with Chrome Explorer
But I have not this problem.
I had an error on the explode method, it says "Only variables can be passed by reference" but when I run the code nothing went wrong. Anyone know how to solve this?
It's just a warning. No problem if it works for now.
Or just try googling about this error if you want to learn more in depth.
Best Wishes!
@@VijayThapa Thank you
What happen if when you rename image, the rand() method generate two similar numbers, which lead to similar image name?
If you need that much of different names, then you can use uniqid() instead of rans
uniqid() will generate unique ids every time.
@Cherry Cottage 1.Your image might not have uploaded successfully.
2. You might have error on displaying the image at img tag.
So, watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Best Wishes!
thank you thank you sir
thank u s much
You are most welcome.
I'm really glad that you enjoyed the course.
Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends.
It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
Thanks and Regards!
Hi sir Vijay Thapa, there is no error in all my code. I went back to your video to see and I compared all my code and your code. but in image_name is blank in sql, the other is not blank the title and featured / active. Please help me
Then there might be following errors
1. You might have forgotten to add "enctype" on your form tag
2. You might have forgotten to pass the value in your SQL query.
3. of some error in your if-else conditional structures.
Thanks and Regards!
Thanks sir for responding to my comment. All perfectly fine sir in my code but image upload is the problem.
The image didn't upload also in the folder I watched your video over and over until I got stuck at 40:40 because the image didn't go to image_name and wasn't uploaded to my "../image/ category /".$ image_name;
Please help me sir. I just got an error in this video, in your video 1,2,3,4 all perfectly done but I only got stuck in your 5. Food Order Website with PHP and MySQL (Add and Display Category)
@@ar1shhhhhhhh Do you have spaces before and after category in your image path?
"../image/ category /".$ image_name;
This could be the problem, please check it and let me know.
Also check whether you're getting correct image name with extension or not.
Best Wishes!
@@VijayThapa May I ask what is your Gmail sir? So I can send my add-category.php
Thank you sir for this work.
@@ar1shhhhhhhh hi@vijaythapa.ccom
my page displays the last record in the table i dont know why ,i hope you answer me ...thank you for the tutorial
Please check your SQL query.
If needed, watch the tutorial once again and compare the code.
It might help your to find the error and fix it.
Best Wishes!
What about required keyword for input tags, why you don't use it ?
Yes, that's great. You can add it.
Also if you can add Server Side Validation.
I've shown a simple path for beginners.
Rest is up to you. Make as advanced and secure as possible.
It's a task for you.
Best Wishes!
Sir, my "active" output is 1 and 0, not yes or no just like featured. What should i do?
Did you add value in ?
If you're saving "1 or 0" value, then you'll need to check for 1 or 0 instead of Yes/No on If-Else Condition.
Hope you understood.
Hii sir , i am getting this error Undefined array key "image"
what should i do???
You might have error somewhere.
Please check the code once.
If needed watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Thanks and Regards!
Your issue solved?