The reason why we use $sn rather than simply echoing $id is due to the keeping a consistent numbering of the items. Upon deleting an item from the database, the id is deleted as well, so in order to keep the numbers complete and in order, the $sn is used. BTW, thanks for such a useful tutorial. Can't wait to learn more from you.
I'm really glad that you understood the concept clearly. Thank you so much for following the tutorials and hope they 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 Regards!
@@VijayThapa Sure. I'll share it with every web developer who intends to advance their skills in PHP. Now I have a request and a question. Could you please upload more projects so we can learn the integration between frontend and backend development? My question is: what's the next step after learning PHP?
I have an error in adding food when we not entered any data and click on add food it gives an error of SQL syntax error what's the problem help me plz ? Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near' image_name = ", c...' at line 4 in C:\xampp\htdocs\food-order admin\add-food.php:186 Stack trace: #0 C:\xampp\htdocs\food-order Plz help me in this
as for the error: $ext = end (explode ('.', $image_name)) ;. replace this one with: $image_info = explode (".", $image_name); $ext = end ($image_info);
Worried about how to make a project with the basic knowledge of HTML,CSS and js....but u nailed it....now feeling confident that even I can create something....do post more and more videos.....
I'm really glad that the tutorials were helpful to you. Now, it's my time to see all of your projects you'll be doing in future. And I'll also make new advanced courses. Best Wishes for Future Endeavors!
man love you i have my submission in 2 days i am using your tutorials from past 3 days super helpful simple easy you may you achieve more more wisdom i hope i get to help you someday tooo you use thats it alot its like it became predictable after some 2 videos how much i have leart about website making in these 3 days i havent learned that all my second year thanks man super helpful
its actually too foolish of me to ask ofc because you have just simply shown how u did and but im just unable to find it since idk anything about those errors i fixed all but i am really uable to fi x these
@@VijayThapa categories img is not showing on home page and categories and food are not being updated rest whole website is working properly every bit of it thanks to you
You're welcome @Julius Albano. And 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!
It's my pleasure. And Thank You So Much for watching the tutorials. Also I'm really glad that the tutorials are really helpful to you. It would support this channel to Grow if you SHARE the videos with your friends and family. I'll continue to make more advanced courses for FREE as long as you watch them. Thanks and Regards!
More to come! Thank you so much for following the videos and I'm really glad that you're enjoying the tutorials. Also It'd support this channel to grow if you SHARE it with your friends and family. And they would also get to learn Software and Web Development for FREE. Thanks and Regards!
You're very welcome! I'm really glad that the course was helpful to you. Also if you think the course 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!
$sn starts from 1 where if we delete something in the middle of the data it will be affected ( for example: if we have a row of 1-10 if we delete something in the middle like 5 it will become 1-9 where the original no6 will become no5) if we use $id, the number will be deleted as well in the database so we will not have no5 anymore and the table will look weird. (ps you taught us before in the previous videos with clear explanation !! ) Can't wait to complete this series
I'm really happy and proud that you've understood every logic behind every code. Hope you've completed all the tutorials from this course by now. 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!
while adding category, my variable is not accepting the value, if i set category_id = $category it does not take the data although i have kept the name correctly and if i set category_id = '$category' then only it accepts the data but all the value are 0 category_id is in int form in db if i echo the title in the and change category_id to varchar then the category's data is being taken else not
When data added on quote ' ', it becomes string. You might have error while passing the data. Check whether you've passed values in your select tag 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!
At 30:54 , i am not getting the categories data in the dropdown menu, i've checked the code many times but unable to find the problem, plzzzzzzz help me through this, i would really appreappciate
I have question at 49:36 ,the image name at 'food' file is correct eg: Food-Name-XXXX . but when it show on my localhost DB are not same, It show me the name as image_name , this make me cannot display the images on manage food part. i check lot of time, the code is same with your😓
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!
Bro whene i enter the price he don't accepts the number with (,) he give me : please enter a valid value . Knowing that in data base the prace is decimal (10,2) and I bought the code yesterday ❤
Yes and decimal means "." - Full stop or Period. Not Comma "," ✅ Price should be in decimal like 10.20 ❌ Not 10,20 Please learn more about relational database as well.
Did you mean "category_id" not inserted properly? In this case, you might have forgotten to make "category_id" auto increment while creating database. Please check it once. If needed, watch the tutorial on creating database for this project. Best Wishes!
I have an error in adding food when we not entered any data and click on add food it gives an error of SQL syntax error what's the problem help me plz ? Error in excute SQL query line in $res2 Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near' image_name = ", c...' at line 4 in C:\xampp\htdocs\food-order admin\add-food.php:186 Stack trace: #0 C:\xampp\htdocs\food-order
We have not added validation to check whether the form is filled or not. So, it may cause errors. You can either use HTML validation or PHP validation (using if-else statement). Also learn fundamentals of Relational Database Management System. Best Wishes!
Check your code once again. If needed, watch the tutorial once again and compare the code. It might help you to find the error and fix it. Best Wishes!
how can i fix this error ? Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' image_name = '', ...' at line 4 in C:\xampp\htdocs\Restaurant\admin\add-food.php:221 Stack trace: #0 C:\xampp\htdocs\Restaurant\admin\add-food.php(221): mysqli_query(Object(mysqli), 'INSERT INTO tbl...') #1 {main} thrown in C:\xampp\htdocs\Restaurant\admin\add-food.php on line 221 i have checked all my syntax properly . I'm around this part of the video 1:07:29
@@VijayThapa yes sir i've mailed you already . i have sent you 2 mails . The first one was with only error Screenshot so i sent u another one with both error screenshot and my code.
Guys please help me. How can I display the category title here in Manage Food(tbl_foods) Im using input type="hidden" for $category_id but I cant display row['title'] from tbl_category
You'll have to use that category id and use SQL query with WHERE keyword to get the category details (Category Title) and Display it. Like, $sql2="SELECT * FROM tbl_category WHERE id=$category_id" Best Wishes!
Hello sir, as you have shown in the video ..1:04:06 inserting the data in database in my case the data is not inserting in database ..its showing "Failed to Add Food" . Can You please guide me regarding my query.
@@VijayThapa same problem here sir when I change my code to sql2 it doesn't add a food but when I try to remove the 2 in sql it successfully add food but the data is not inserted in database
@@khaliddalman281 email me the screenshot of your error and code at hi@vijaythapa.com. Without looking at your code, I cannot suggest you anything. Thanks and Regards!
sir when we redirect to a particular page , from which page we have redirected this should die automatically as we will enter the page from beginning , shoudn't it sir???
Please check the value of your featured and active input. The Value should be "Yes/No" not "on". You might have missed something there. 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!
buddy i dont know you may answer this question or not but want to know that there is an issue while apply menu and footer file maybe its quirk mode issue how to handle it idk i tried html doc type at start but maybe i m doing wrong or maybe im missing something its not stoping me but its ruining all the fun and look or what we are creating. what to do with this?
@@VijayThapa ''Thankyou for time.. it found out my mistake somehow my footer and header get "1" at the end. i mistakenly apply echo in both header and footer it leads me to this problem.. ThankYou bro your reply.. you are amazing ''❤❤🫂🫂
I am facing error while renaming image..it says only variables should be passed by refrence in some code it works in some it dont...plz helf if you can
Hi, there is an problem from my output on database as in the description does not show in the database. i had double check on the code and there is no errors on it, but the data which is the description key in in the system does not send to the database. Can i k ow what is the problem on it? Also the code does not let me to enter decimal numbers for price as in when i want to enter 7.50 it says need to enter a number without decimal, when i entered 7, the output will display 7.00, can I know is there any method for me to enter decimal number before adding food item?
You might have error in your SQL query or getting data from the form. Please check it 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 Hi Sir, I've review the tutorial again but it seems that there isn't any problem with it. But its okay sir! I've remove the function for it and it goes well!
@@VijayThapa Sir, may I ask is there any tutorial on adding cart functions, and also user management functions such as sign in, login, forgot password? And cart functions too
@@celinema0202 May be in the new course. Not on this one. And if you've come so far, I hope you understood most of the concepts. So, I'd recommend you to add rest of the functions. Sign in is similar to Add User, Login is similar to Admin Login, you just need to first read articles behind the concept of forgot password and Cart, then you can try on your own. I'm sure you'll be able to add those features. Best Wishes!
@@VijayThapa Thank you sir! I'll try my best as in currently I had successfully developed login and sign-in page by connecting the database! Thank you so much on the tutorials as in I am a beginner of php. But after finish watching the tutorials, I had able to understand basics coding on php! Hope sir can do more tutorials as in your explanation is really simple to be understand by slow learners like me!
I come from the future to ask to ask why not use a foreach loop to parse the query results like if (mysqli_num_rows($res_categories) > 0) { foreach ($res_categories as $res_category) { ....
Hello @Vijay Thapa ! I followed along the clip and at 1:07:33 timestamp when I try to add food I get a warning: " Cannot modify header information - headers aleready sent..... the error is at the header inside if($res2==true)
Try adding following code at the top of "constants.php" file ob_start(); If you want to know more about the error and the code above, then please follow the link below www.vijaythapa.com.np/2021/08/how-to-fix-headers-already-sent-error.html Thanks and Regards!
@@amirals9110 You're welcome Bro! Also if you think the tutorials could be helpful to others, then please SHAR 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!
help please . im getting an error when clicking on add food button . Data is inserted in db but i get an error message saying : Only variables should be passed by reference in this line $ext=end(explode('.',$image_name));
If image is not displayed, then check 1. Whether the image_name is added in database or not 2. Whether the image file is uploaded on folder or not 3. Whether the image path while displaying the image is correct or not. Best Wishes!
Good day sir, Could please assist me! Im getting these 2 error in my add food ! Notice: Only variables should be passed by reference in C:\xampp\htdocs\market\Admin\addfood.php on line 138 Fatal error: Uncaught Error: Undefined constant "SITEURL" in C:\xampp\htdocs\market\Admin\addfood.php:176 Stack trace: #0 {main} thrown in C:\xampp\htdocs\market\Admin\addfood.php on line 176
You might have error in your redirect URL. Please check whether SITEURL constant is connected and used correctly 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!
To fix this error, just put the following code at the top of constants.php file ob_start(); If you want to read more about the code and error, then follow the link below www.vijaythapa.com.np/2021/08/how-to-fix-headers-already-sent-error.html Best Wishes!
the $ext is not working the image is renamed as .Array not .jpg can u help me ? and one thing, the food is added successfully and it shows in the DB but in the visual studio code it does nor appear under the food folder why?
Try checking the code once again while renaming the image. 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 think the reason for not using $id and opting for for $sn is because in the db $id its auto incremented,,and when we delete any row in the manage food.php the rows will have unordered numbering since they obtain the numbering valuation from the db.
@@vikisneakers You're welcome Bro. 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 why does if I included and image when i'm adding new product, it wont be uploaded/recorded to the database but if i didn't inclue and image it will be recorded to the database, pls help ty!
You might have error in your if-else statement. Please check it 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!
Sir, I have a doubt There is a notice displaying on my manage food Notice: Only variables should be passed by reference on the line $ext = end(explode('.' , $image_name)); What should I do now. But my data us adding successfully in the database.
Hello Mr. Vijay, i have an error message when that says (Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\RentalSystem\admin\add-vehicles.php:124)) This is when submitting the form and it's nor redirecting but the data is added. Any Idea!!
To fix this issue, add the following code at the top of “constants.php” ob_start(); If you want to know more about this code and error, then follow the link below www.vijaythapa.com.np/2021/08/how-to-fix-headers-already-sent-error.html Thanks and Regards!
Sir, My data in not getting inserted into the database. i have checked every detail, sql query upload if else statement , i cant find the error. Please help anyone if knows whats wrong with my code. Also my image is getting uploaded in the food folder. It's urgent guys please help if anybody knows the answer.
Hello vijay I hope you doing well! i have some notice or error at $ext = end(explode('.', $image_name));. it say that "only variables should be passed by reference", can i know why its say that and it cant redirect to manage-food also but still the data in the form was uploaded in the php
Please check the code once again at image uploading section. You might have error there. Also check carefully at if-else section and curly brackets as well. If needed, watch the tutorial once again and compare the code. It might help you to find the error and fix it. Best Wishes!
Just add following code at the top of "constants.php". ob_start(); And if you want to know more about the error and this code, then please follow the link below www.vijaythapa.com.np/2021/08/how-to-fix-headers-already-sent-error.html Best Wishes!
Please check the code on displaying the category. 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!
What and when do you not get data? Try checking your code. If needed watch the tutorial once again and compare your code with mine. It might help you to find the error and fix it. Best Wishes!
Hello sir I am facing Forbidden You don't have permission to access this resource. Apache/2.4.54 (Win64) OpenSSL/1.1.1p PHP/8.1.12 Server at localhost Port 80 this error .
First Check whether your MySQL and Apache is running or not in your XAMPP. Then check your redirect URL. If needed, watch the tutorial once again and compare the codee. It might help you to find the error and fix it. Best Wishes!
Food order website tutorial 7 i have face some issue. in add food pictures select from food folder are only displaying and picture from desktop are not displaying in manage-food page. kindly guide.
First, Check whether your image is uploaded successfully or not. And also check whether the image_name is saved on database 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!
Hi, I have a need to put an apostrophe in my Titles, but when I do, it doesn't write to the database. If I don't use an apostrophe everything works well. Can you help with allowing an apostrophe in the Title? Thank you
You may have error in your code. Please check it once. Either while passing the data from form or on 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!
Your tutorial is the best. Followed each step and it's working perfectly. But when I got to the add food section it keeps telling me it's forbidden and that I don't have access to that page
Then you have an error in your "Add Food" URL (link). 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!
move_uploaded_file() isn't working when I give destination path as "../images/food/".$image_name but works when given as "../images/food".$image_name. please have a look at this problem
Please check the value of $image_name. Does it contain "/" in front of the value? Watching the tutorial once again and comparing the code might help you to find the bug and fix it. Best Wishes!
@@VijayThapa I have two folders inside images 1.category 2.food. when I am using category folder everything works but when I am working on food folder image is not getting copied there . I have checked the permission for food folder and it's 777 in Linux . Don't know what's happening
@@yogeshyadav2525 You might have missed something, either on form or on the code after submit button. Please check once or email me at hi@vijaythapa.com Thanks and Regards!
Hello sir! Thank you for your complete and greate toturial I have a problem with renaming the images, my phpstorm don't know the end function and show an error.
Did you write the code as I've shown? Do you get error while adding foods? Sometime text editor might not know exact built in functions in a programming language. You can always check the documentation of any language when in doubt. end function in PHP - www.php.net/manual/en/function.end.php Best Wishes!
Thank u sir for your tutorial. but I have got an issue with uploading an image. i did the same u did but it says failed to upload an image. any help pls
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. Thanks and Regards!
You might have error either on 1. Getting the correct values from Form 2. Your SQL Query (Database Columns and Values) 3. Executing the query and checking with if-else statement Please watch the tutorial once again and compare the code. It might help you to find the error and fix it. Best Wishes!
It's because "Title is changeable. It can be updated. But ID remains permanent." So if you know the fundamental properties of Primary and Foreign Key, and their relationship, then it must be clear to you now. i.e. Primary key should always be Unique and constant (Permanent) and Foreign key must be primary key of another table. Hope you understand now, else please read more about relational database. Thanks and Regards!
Then you might have error 1. on getting the data 2. uploading the image 3. SQL Query 4. If-Else Condition Try watching the tutorial once again and compare the code. It might help you to find the error and fix it. Best Wishes!
@@VijayThapa Sir I've checked my code till 1:06:52 I'm getting no error but as I change the value of $res2=mysqli_query($conn, $sql) to $res2=mysqli_query($conn, $sql2) I'm getting error failed to add food please help sir!
sir , I have a problem while adding food it always shows Failed to add food after I click the add food button, and the data also was not saving in the database after executing $res2 = mysqli_query($conn, $sql2); and the image is uploading in the ../images/food/ i don't know where is the problem there
I am having an error at the image name extension part. Error-Name can take only variable. But changes are visible in database. Also it is not redirecting to manage food page. Please help
It might just be an warning. The actual error might be on redirection. Please check the code there. 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 why is it whenever I put sql2 in executing the query I received Notice: Only Variables Shoul be passes by reference in C:\xampp\htdocs\food-order\admin\add-food.php on line 173
Yes sir i have other error. Notice: Only variables should be passed by reference in C:\xampp\htdocs\food-order\admin\add-food.php on line 173 Fatal error: Uncaught mysqli_sql_exception: Unknown column 'title' in 'field list' in C:\xampp\htdocs\food-order\admin\add-food.php:224 Stack trace: #0 C:\xampp\htdocs\food-order\admin\add-food.php(224): mysqli_query(Object(mysqli), 'INSERT INTO tbl...') #1 {main} thrown in C:\xampp\htdocs\food-order\admin\add-food.php on line 224
Sir, I have a Problem Fatal error: Uncaught Error: Call to undefined function unlike() in C:\xampp\htdocs estaurant-mangement\admin\delete-category.php:17 Stack trace: #0 {main} thrown in C:\xampp\htdocs estaurant-mangement\admin\delete-category.php on line 17 How do I fix it?
Please check the code once gain. If needed watch the tutorial again and compare the code. It might help you to find the error and fix it. And if you couldn't fix the error, then email me at hi@vijaythapa.com with the screenshot of your error and code. Best Wishes!
In Which Section? Anyway ID is always Unique but there might be more than 1 item with the same name. Please learn more about Relational Databases. Best Wishes!
I dont know why but my image is not uploading every single content is updated in the table apart from image_name and image is also not uploading in the food folder. Sir please help.
@@SinghPratyush10 hey bro please help me with this , I'm also stuck with this problem for quite some time now and I'm not able to figure out a solution. I'm facing the same issue as u mentioned.
@@feet_investigatorr I have to look at it again bro....give me some time...its been 6 months and I don't remember what i did back then. I will get back to you after looking at the project again
Hello sir In add-food section data is save into database ,and as well as in the folder i created But but in tab it won't redirect to manage food And give error ,, Only variables should be passed by reference 😑
If you cannot go to phpmyadmin, then you might have error in your local server (XAMPP). If failed to add food, then you might have error somewhere in you code. Watch the tutorial once again and compare the code. It might help you to find the error and fix it. Thanks and Regards!
Thank you sir you're awesome teacher and great tutorial series I recommend it specially beginners will learn a lot here do like, share, and subscribe...
Hello sir. I have a problem with renaming images. I cpoied everything from your video, but it is giving just 0 in database instead of Food-Name. Could you help me please?
Don't just copy the codes. Try to understand them as well. Please check the code ones again. Are you getting the correct image name from image selection button? If you're not getting the image name after selecting, other things won't work. Check your if-else conditions. If needed, watch the tutorial once again and compare the code. It might help you to find the error and fix it. Best Wishes!
@@alinaalina3725 heyy please can u elaborate it ? I'm facing the same issue where my image is not getting updated in food folders as well as in database also sometimes when I only pass an image i get a SQL query error
Sir I'm stuck at one place! That my image_name is not showing in database I've understand everything and i checked the code 3 times but still can't find anything, please help! Note : I'm not getting any error too!
Hey dude can u please help me with the solution? I'm also stuck at one place , my image is not uploading in database as well as in food folder . I'm also getting an Sql exception.
Please check your enctype property for your form. And watching the tutorial once again and comparing your code might be helpful to you to find the bug and fix it. Best Wishes!
can you fix this in this code $ext = end(explode('.', $image_name)); this is the error Notice: Only variables should be passed by reference in C:\xampp\htdocs\food-order\admin\add-food.php on line 163 please help
@@VijayThapa I can't send an image on @vijaythapa.com i already sent you my problem there. $ext = end(explode('.', $image_name)); this is the error Notice: Only variables should be passed by reference in C:\xampp\htdocs\food-order\admin\add-food.php on line 163 that is my problem
I watched your tutorial And it's very helpful in our project But can I ask a question How to fix if there's a notice like this only variables should be passed by reference in c:\xampp\htdocs\system\admin\add-food.php And have a warning like this Cannot modify header information
Just add the following code at the top of "constants.php" file ob_start(); If you want to know more about the error and this code, then please follow the link below www.vijaythapa.com.np/2021/08/how-to-fix-headers-already-sent-error.html Thanks and Regards!
In database we only save the name of the image. You might have one of the following errors 1. Failed to Upload the Image 2. The link to display the image is wrong So, please check the video once again more carefully. It might help you to find the bug and fix it. Best Wishes!
@@mariojreige4973 Thank you so much for following my courses. Hope they were helpful to you. 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 Development for FREE. Thanks and Regards!
@@VijayThapa yes of course thank you so much again, and i want to ask you if you can continue this website on your next work and update it to advanced php like ajax jquery.
You might have error in your upload variable. Please watch the tutorial once again and compare the code. It might help you to find the bug and fix it. Thanks and Regards!
Then you might have error in comparing the code or encrypting the code. Please check the code once again, 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, I am getting an Error please help..... Notice: Only variables should be passed by reference in C:\xampp\htdocs\food-order\admin\add-food.php on line 165 Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\food-order\admin\add-food.php:100) in C:\xampp\htdocs\food-order\admin\add-food.php on line 207
Hi, I'm getting this warning, please help me to solve it. Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\food-order\admin\add-food.php:126) in C:\xampp\htdocs\food-order\admin\add-food.php on line 205
@@priankamondal1764 You're welcome. Hope you complete the course soon. Also if you think the tutorials are helpful to you and can help others as well, then please SHARE. It helps this channel to GROW and your loved ones can also learn Web Development for FREE. Thanks and Regards!
The reason why we use $sn rather than simply echoing $id is due to the keeping a consistent numbering of the items. Upon deleting an item from the database, the id is deleted as well, so in order to keep the numbers complete and in order, the $sn is used. BTW, thanks for such a useful tutorial. Can't wait to learn more from you.
I'm really glad that you understood the concept clearly.
Thank you so much for following the tutorials and hope they 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 Regards!
@@VijayThapa
Sure. I'll share it with every web developer who intends to advance their skills in PHP.
Now I have a request and a question. Could you please upload more projects so we can learn the integration between frontend and backend development?
My question is: what's the next step after learning PHP?
ตคสสสนนนฟนนนนนนนนนนน สมสมสมวคึสึรนงางฝงางงใมงงฝงฃงางงงงงงงงฝงสวนสมมาสสมสมสมสมสมสมสมสมสมสมราคายคึึคึึคีึสมสมสมสมััสมสมสมสมสมสมสมสมสมสมสมสมสมสมสมสมสมสสสสสวสค่าาาท่ารถสารรถต
I have an error in adding food when we not entered any data and click on add food it gives an error of SQL syntax error what's the problem help me plz ?
Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near' image_name = ", c...' at line 4 in C:\xampp\htdocs\food-order admin\add-food.php:186 Stack trace: #0 C:\xampp\htdocs\food-order
Plz help me in this
@@patilcreation4380 Having the same problem
as for the error: $ext = end (explode ('.', $image_name)) ;.
replace this one with:
$image_info = explode (".", $image_name);
$ext = end ($image_info);
thanku so much..
Thanks
thank youuuu it workedd..
Thanks 😊🙏🏽my brother
thanks
Worried about how to make a project with the basic knowledge of HTML,CSS and js....but u nailed it....now feeling confident that even I can create something....do post more and more videos.....
I'm really glad that the tutorials were helpful to you.
Now, it's my time to see all of your projects you'll be doing in future.
And I'll also make new advanced courses.
Best Wishes for Future Endeavors!
master great works, best steps, i just love your way. keep the fire burning Thank u
Thank you so much @Emmy for following the tutorials.
And I'm really glad that you're enjoying the tutorials.
Best Wishes!
man love you
i have my submission in 2 days i am using your tutorials from past 3 days super helpful simple easy you may you achieve more more wisdom i hope i get to help you someday tooo
you use thats it alot its like it became predictable after some 2 videos
how much i have leart about website making in these 3 days i havent learned that all my second year thanks man super helpful
I'm really glad that the course is helpful to you.
Thank you so much for following.
Hope you complete all the courses soon.
Best Wishes!
its actually too foolish of me to ask ofc because you have just simply shown how u did and but im just unable to find it since idk anything about those errors i fixed all but i am really uable to fi x these
@@dhackmt What error are you facing?
@@VijayThapa categories img is not showing on home page and categories and food are not being updated rest whole website is working properly every bit of it thanks to you
@@dhackmt Please email me at hi@vijaythapa.com with the screenshot of your error and code.
You're really great Vijay Dai. Thank you so much for this tutorial.
Love from Shillong, India🇮🇳🇳🇵
I'm really glad that you enjoyed the tutorials.
Thank you so much for your love and support.
oh finally a video like this thx so much
You're welcome @Julius Albano.
And 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!
Good man , you are doing a great job , keep it up and thanks for you to sharing it with us.
It's my pleasure.
And Thank You So Much for watching the tutorials. Also I'm really glad that the tutorials are really helpful to you.
It would support this channel to Grow if you SHARE the videos with your friends and family.
I'll continue to make more advanced courses for FREE as long as you watch them.
Thanks and Regards!
Thanks for your amazing explanation
Finally found the full stack, a very excellent video, thank you, the owner, I hope you can keep updating it, thank you very much
More to come!
Thank you so much for following the videos and I'm really glad that you're enjoying the tutorials.
Also It'd support this channel to grow if you SHARE it with your friends and family. And they would also get to learn Software and Web Development for FREE.
Thanks and Regards!
thank you so much for this tutorial. You are a great teacher :)
You're very welcome!
I'm really glad that the course was helpful to you.
Also if you think the course 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!
$sn starts from 1 where if we delete something in the middle of the data it will be affected ( for example: if we have a row of 1-10 if we delete something in the middle like 5 it will become 1-9 where the original no6 will become no5) if we use $id, the number will be deleted as well in the database so we will not have no5 anymore and the table will look weird. (ps you taught us before in the previous videos with clear explanation !! ) Can't wait to complete this series
I'm really happy and proud that you've understood every logic behind every code.
Hope you've completed all the tutorials from this course by now.
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!
while adding category, my variable is not accepting the value,
if i set category_id = $category
it does not take the data although i have kept the name correctly
and if i set category_id = '$category'
then only it accepts the data but all the value are 0
category_id is in int form in db
if i echo the title in the and change category_id to varchar then the category's data is being taken else not
When data added on quote ' ', it becomes string.
You might have error while passing the data.
Check whether you've passed values in your select tag 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!
At 30:54 , i am not getting the categories data in the dropdown menu, i've checked the code many times but unable to find the problem,
plzzzzzzz help me through this, i would really appreappciate
Please email me with the screenshot of your error and code at hi@vijaythapa.com
thank you.it is very good😍😍😍😍😍
Thank you so much.
I'm really glad that you enjoyed the tutorials.
Hope you completed all the tutorials.
I have question at 49:36 ,the image name at 'food' file is correct eg: Food-Name-XXXX . but when it show on my localhost DB are not same, It show me the name as image_name , this make me cannot display the images on manage food part. i check lot of time, the code is same with your😓
Please check your code at "if-else" statement while renaming the image.
You might have missed something there.
Best Wishes!
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!
1:21:47 because in xampp it will continously increment so we need variable sn to increment it repeatedly starting to 1 :D
That's right!
I'm glad that you're learning in depth.
Best Wishes!
Bro whene i enter the price he don't accepts the number with (,) he give me : please enter a valid value . Knowing that in data base the prace is decimal (10,2) and I bought the code yesterday ❤
Yes and decimal means "." - Full stop or Period. Not Comma ","
✅ Price should be in decimal like 10.20
❌ Not 10,20
Please learn more about relational database as well.
@VijayThapa yes I mean "." Not"," .example when i enter 3.5 he give me : please enter a valid value 3 or 4
@@omarmostafa4368 It worked for everyone.
Please email me at hi@vijaythapa.com with the screenshot of your error.
hello vijay thapa, my category_id doesn't seem to be generating any info asides zero in my database
every other thing working perfectly
Did you mean "category_id" not inserted properly?
In this case, you might have forgotten to make "category_id" auto increment while creating database.
Please check it once.
If needed, watch the tutorial on creating database for this project.
Best Wishes!
@@VijayThapa thank you for your swift reply sir, kindly check your mail sir, i sent a picture of the problem
I have an error in adding food when we not entered any data and click on add food it gives an error of SQL syntax error what's the problem help me plz ?
Error in excute SQL query line in $res2
Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near' image_name = ", c...' at line 4 in C:\xampp\htdocs\food-order admin\add-food.php:186 Stack trace: #0 C:\xampp\htdocs\food-order
We have not added validation to check whether the form is filled or not.
So, it may cause errors.
You can either use HTML validation or PHP validation (using if-else statement).
Also learn fundamentals of Relational Database Management System.
Best Wishes!
@@VijayThapa Tysm sir I have added the validation and it's working I have one more error of image printing on video no 9 I have comment u plz check it
@@patilcreation4380 Email me at hi@vijaythapa.com with the screenshots of your error and code.
35:55, my submit button is no clicked, how can i do?
Check your code once again.
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 ❤
how can i fix this error ?
Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' image_name = '', ...' at line 4 in C:\xampp\htdocs\Restaurant\admin\add-food.php:221 Stack trace: #0 C:\xampp\htdocs\Restaurant\admin\add-food.php(221): mysqli_query(Object(mysqli), 'INSERT INTO tbl...') #1 {main} thrown in C:\xampp\htdocs\Restaurant\admin\add-food.php on line 221
i have checked all my syntax properly . I'm around this part of the video 1:07:29
Please email me at hi@vijaythapa.com with the screenshot of your error and code.
@@VijayThapa yes sir i've mailed you already . i have sent you 2 mails . The first one was with only error Screenshot so i sent u another one with both error screenshot and my code.
@@VijayThapa sir it's been 3 days since I mailed , can you please help me out it's urgent
@@rajivkardak8405 I am hoping he can respond to my email too because i have a similar error
Guys please help me. How can I display the category title here in Manage Food(tbl_foods)
Im using input type="hidden" for $category_id but I cant display row['title'] from tbl_category
You'll have to use that category id and use SQL query with WHERE keyword to get the category details (Category Title) and Display it.
Like,
$sql2="SELECT * FROM tbl_category WHERE id=$category_id"
Best Wishes!
@@VijayThapa thanks very much master
master@@VijayThapa
thanks sir it works
now I will try to add a Users Login/SignUp System in front(not on SITEURL:admin.php), and make it auto populate in order.php
Hello sir, as you have shown in the video ..1:04:06 inserting the data in database
in my case the data is not inserting in database ..its showing "Failed to Add Food" .
Can You please guide me regarding my query.
Please email me at hi@vijaythapa.com with the screenshot of your error and code.
Thanks and Regards!
@@VijayThapa same problem here sir when I change my code to sql2 it doesn't add a food but when I try to remove the 2 in sql it successfully add food but the data is not inserted in database
@@khaliddalman281 email me the screenshot of your error and code at hi@vijaythapa.com.
Without looking at your code, I cannot suggest you anything.
Thanks and Regards!
@@VijayThapa hello Sir thank you for responding to my message, I already Emailed to you my error of my source code
sir when we redirect to a particular page , from which page we have redirected this should die automatically as we will enter the page from beginning , shoudn't it sir???
featured and active are saved in the database always as "on" what may be the problem?
Please check the value of your featured and active input.
The Value should be "Yes/No" not "on".
You might have missed something there.
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!
buddy i dont know you may answer this question or not but want to know that there is an issue while apply menu and footer file maybe its quirk mode issue how to handle it idk i tried html doc type at start but maybe i m doing wrong or maybe im missing something its not stoping me but its ruining all the fun and look or what we are creating. what to do with this?
What's the error?
@@VijayThapa ''Thankyou for time.. it found out my mistake somehow my footer and header get "1" at the end. i mistakenly apply echo in both header and footer it leads me to this problem.. ThankYou bro your reply.. you are amazing ''❤❤🫂🫂
I am facing error while renaming image..it says only variables should be passed by refrence in some code it works in some it dont...plz helf if you can
You might be having other error than "only variables should be passed".
Please let me know. This one is just a warning.
Thanks and Regards!
Hi, there is an problem from my output on database as in the description does not show in the database. i had double check on the code and there is no errors on it, but the data which is the description key in in the system does not send to the database. Can i k ow what is the problem on it? Also the code does not let me to enter decimal numbers for price as in when i want to enter 7.50 it says need to enter a number without decimal, when i entered 7, the output will display 7.00, can I know is there any method for me to enter decimal number before adding food item?
You might have error in your SQL query or getting data from the form.
Please check it 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 Hi Sir, I've review the tutorial again but it seems that there isn't any problem with it. But its okay sir! I've remove the function for it and it goes well!
@@VijayThapa Sir, may I ask is there any tutorial on adding cart functions, and also user management functions such as sign in, login, forgot password? And cart functions too
@@celinema0202 May be in the new course. Not on this one.
And if you've come so far, I hope you understood most of the concepts.
So, I'd recommend you to add rest of the functions.
Sign in is similar to Add User, Login is similar to Admin Login, you just need to first read articles behind the concept of forgot password and Cart, then you can try on your own.
I'm sure you'll be able to add those features.
Best Wishes!
@@VijayThapa Thank you sir! I'll try my best as in currently I had successfully developed login and sign-in page by connecting the database! Thank you so much on the tutorials as in I am a beginner of php. But after finish watching the tutorials, I had able to understand basics coding on php! Hope sir can do more tutorials as in your explanation is really simple to be understand by slow learners like me!
May I know that your code is able to add XML into it? And how to use the XML code in your code? As I followed your every step to make my website.
I come from the future to ask to ask why not use a foreach loop to parse the query results
like
if (mysqli_num_rows($res_categories) > 0) {
foreach ($res_categories as $res_category) {
....
Sir. I have got an issue with upload image .i did the same u did but it not upload the image browser but not showing error
You may have error in your code.
Please check it once.
If needed, watch the tutorial once again and compare the code.
Best wishes!
Hello @Vijay Thapa ! I followed along the clip and at 1:07:33 timestamp when I try to add food I get a warning: " Cannot modify header information - headers aleready sent..... the error is at the header inside if($res2==true)
However, the food is still added in the database
Try adding following code at the top of "constants.php" file
ob_start();
If you want to know more about the error and the code above, then please follow the link below
www.vijaythapa.com.np/2021/08/how-to-fix-headers-already-sent-error.html
Thanks and Regards!
@@VijayThapa it worked, thanks man
@@amirals9110 You're welcome Bro!
Also if you think the tutorials could be helpful to others, then please SHAR 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!
help please . im getting an error when clicking on add food button . Data is inserted in db but i get an error message saying : Only variables should be passed by reference in this line $ext=end(explode('.',$image_name));
Someone comment solution for this try that code
Did ur images displayed in manage food page ?
That's just a warning.
You may have more message.
Please email me at hi@vijaythapa.com with the screenshot of your error and code.
Thanks and Regards!
If image is not displayed, then check
1. Whether the image_name is added in database or not
2. Whether the image file is uploaded on folder or not
3. Whether the image path while displaying the image is correct or not.
Best Wishes!
Sir how to change the dollar symbol to rupees which part is in the video pls tell the point
Just open the file where you want to change, then replace the dollar sign manually.
Good day sir, Could please assist me! Im getting these 2 error in my add food !
Notice: Only variables should be passed by reference in C:\xampp\htdocs\market\Admin\addfood.php on line 138
Fatal error: Uncaught Error: Undefined constant "SITEURL" in C:\xampp\htdocs\market\Admin\addfood.php:176 Stack trace: #0 {main} thrown in C:\xampp\htdocs\market\Admin\addfood.php on line 176
You might have error in your redirect URL.
Please check whether SITEURL constant is connected and used correctly 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!
Hi, can I know what is the difference between which is open php and close it, and ?>
To fix this error, just put the following code at the top of constants.php file
ob_start();
If you want to read more about the code and error, then follow the link below
www.vijaythapa.com.np/2021/08/how-to-fix-headers-already-sent-error.html
Best Wishes!
@@VijayThapa thank you sir for the website and your guide! the problem is solved🥰
the $ext is not working the image is renamed as .Array not .jpg
can u help me ?
and one thing, the food is added successfully and it shows in the DB but in the visual studio code it does nor appear under the food folder why?
Try checking the code once again while renaming the image.
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 think the reason for not using $id and opting for for $sn is because in the db $id its auto incremented,,and when we delete any row in the manage food.php the rows will have unordered numbering since they obtain the numbering valuation from the db.
💯 Correct.
I'm really glad that you're understanding the basic concepts and logics clearly.
Best Wishes!
@@VijayThapa All thanks to you😊
@@vikisneakers You're welcome Bro.
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 why does if I included and image when i'm adding new product, it wont be uploaded/recorded to the database but if i didn't inclue and image it will be recorded to the database, pls help ty!
You might have error in your if-else statement.
Please check it 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 thanks i already found the error. Your videos are great and keep doing it it really helps. God bless you!
Sir, I have a doubt
There is a notice displaying on my manage food
Notice: Only variables should be passed by reference on the line
$ext = end(explode('.' , $image_name));
What should I do now. But my data us adding successfully in the database.
I'm facing the same issue.....
@@manojupadhya2001 me too
This is right my problem Sir...
Fix
$ext = explode(".", $image_name); // lay duoc jpg
$file_extension = end($ext);
$image_name = "Food_Name_" . rand(0000, 9999) . '.' . $file_extension;
@@auragaming6139 heyy Thank youu it's work for me
31:57 base on my understanding for value="" . The $ is php syntax so we need to write it as . Am I right ??
Yes, That's correct.
Hello Mr. Vijay, i have an error message when that says (Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\RentalSystem\admin\add-vehicles.php:124)) This is when submitting the form and it's nor redirecting but the data is added. Any Idea!!
To fix this issue, add the following code at the top of “constants.php”
ob_start();
If you want to know more about this code and error, then follow the link below
www.vijaythapa.com.np/2021/08/how-to-fix-headers-already-sent-error.html
Thanks and Regards!
Sir, My data in not getting inserted into the database. i have checked every detail, sql query upload if else statement , i cant find the error. Please help anyone if knows whats wrong with my code. Also my image is getting uploaded in the food folder. It's urgent guys please help if anybody knows the answer.
What error message do you get?
Hello vijay I hope you doing well! i have some notice or error at $ext = end(explode('.', $image_name));. it say that "only variables should be passed by reference", can i know why its say that and it cant redirect to manage-food also but still the data in the form was uploaded in the php
It's just a warning.
You may also have another error message.
Please let me know.
Thanks and Regards!
sir in 7 th lecture image upload but not show in database i am write esi it code but no image upload in food folder or database
Please check the code once again at image uploading section.
You might have error there.
Also check carefully at if-else section and curly brackets as well.
If needed, watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Best Wishes!
Did u find any solution? Please help me with it , I'm also stuck at it
Cannot modify header information - headers already sent by how solve this error
Just add following code at the top of "constants.php".
ob_start();
And if you want to know more about the error and this code, then please follow the link below
www.vijaythapa.com.np/2021/08/how-to-fix-headers-already-sent-error.html
Best Wishes!
Sir , in add food page description and category is not showing sir it's coming 0 in local host what to do sir 😢
Please check the code on displaying the category.
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
There is an error saying, that the food cannot be added I really dnt know why and I have crosschecked with your code
Email me at hi@vijaythapa.com with the screenshot of your error and code.
Thanks and Regards!
Hello, I am currently enjoying learning this but I am stuck. I cannot get any data into the database yet there is no error. please help.
What and when do you not get data?
Try checking your code.
If needed watch the tutorial once again and compare your code with mine.
It might help you to find the error and fix it.
Best Wishes!
Hello sir
I am facing
Forbidden
You don't have permission to access this resource.
Apache/2.4.54 (Win64) OpenSSL/1.1.1p PHP/8.1.12 Server at localhost Port 80
this error .
First Check whether your MySQL and Apache is running or not in your XAMPP.
Then check your redirect URL.
If needed, watch the tutorial once again and compare the codee.
It might help you to find the error and fix it.
Best Wishes!
Food order website tutorial 7 i have face some issue. in add food pictures select from food folder are only displaying and picture from desktop are not displaying in manage-food page. kindly guide.
First, Check whether your image is uploaded successfully or not.
And also check whether the image_name is saved on database 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!
bro please can i somehow give u my code for this part because my code is saying failed to upload
i fixed all my other problems but I cant figure this out
What's the error?
Hi, I have a need to put an apostrophe in my Titles, but when I do, it doesn't write to the database. If I don't use an apostrophe everything works well. Can you help with allowing an apostrophe in the Title? Thank you
Watch the episode 13, it'll solve the problem.
You just need to use mysqli_real_escape_string() function
@@VijayThapa Thank you for your quick reply. I'm looking forward to it. I would jump ahead but this is so interesting. Thank you
Hello sir
In this tutorial my price and category_id is not inserted into database
You may have error in your code.
Please check it once.
Either while passing the data from form or on 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!
Your tutorial is the best. Followed each step and it's working perfectly. But when I got to the add food section it keeps telling me it's forbidden and that I don't have access to that page
Then you have an error in your "Add Food" URL (link).
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 Thank you so much
move_uploaded_file() isn't working when I give destination path as "../images/food/".$image_name but works when given as "../images/food".$image_name. please have a look at this problem
Please check the value of $image_name.
Does it contain "/" in front of the value?
Watching the tutorial once again and comparing the code might help you to find the bug and fix it.
Best Wishes!
@@VijayThapa I have two folders inside images 1.category 2.food. when I am using category folder everything works but when I am working on food folder image is not getting copied there . I have checked the permission for food folder and it's 777 in Linux . Don't know what's happening
@@yogeshyadav2525 You might have missed something, either on form or on the code after submit button.
Please check once or email me at hi@vijaythapa.com
Thanks and Regards!
Hello sir!
Thank you for your complete and greate toturial
I have a problem with renaming the images, my phpstorm don't know the end function and show an error.
Did you write the code as I've shown?
Do you get error while adding foods?
Sometime text editor might not know exact built in functions in a programming language.
You can always check the documentation of any language when in doubt.
end function in PHP - www.php.net/manual/en/function.end.php
Best Wishes!
Thank you so much
You're most welcome.
Thank u sir for your tutorial. but I have got an issue with uploading an image. i did the same u did but it says failed to upload an image. any help pls
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.
Thanks and Regards!
Sir. I have got an issue with upload image .i did the same u did but it not upload the image browser but not showing error
I have a proble while adding food it always shows food not added after i clck the add food button, i don't know where is the problem here
You might have error either on
1. Getting the correct values from Form
2. Your SQL Query (Database Columns and Values)
3. Executing the query and checking with if-else statement
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, what is the function of featured and active for both food and category? hope u can help. Thank you😊
Please watch the video from the link below
ua-cam.com/video/GxCh9B0ZU6E/v-deo.html
32:08
yes sir i want to know about that.. please tell
It's because "Title is changeable. It can be updated. But ID remains permanent."
So if you know the fundamental properties of Primary and Foreign Key, and their relationship, then it must be clear to you now.
i.e.
Primary key should always be Unique and constant (Permanent) and Foreign key must be primary key of another table.
Hope you understand now, else please read more about relational database.
Thanks and Regards!
Sir how can we display the price in Indian currency
Go to the file where you're displaying price
Then just replace the dollar sign with Indian Rupee.
Sir I'm getting error at 1:07:45 Failed to add food please help sir!
Then you might have error
1. on getting the data
2. uploading the image
3. SQL Query
4. If-Else Condition
Try watching the tutorial once again and compare the code.
It might help you to find the error and fix it.
Best Wishes!
@@VijayThapa ohkay thank you sir
@@VijayThapa Sir I've checked my code till 1:06:52 I'm getting no error but as I change the value of $res2=mysqli_query($conn, $sql) to $res2=mysqli_query($conn, $sql2) I'm getting error failed to add food please help sir!
@@harshyadav4307 $sql2 = "INSERT INTO tbl_food SET
title = '$title',
description = '$description',
price = $price,
image_name = '$image_name',
category_id = $category,
featured = '$featured',
active = '$active'
";
paste this query
sir ,
I have a problem while adding food it always shows Failed to add food after I click the add food button, and the data also was not saving in the database after executing $res2 = mysqli_query($conn, $sql2); and the image is uploading in the ../images/food/
i don't know where is the problem there
Please check the code once again.
If needed, watch the tutorial and compare the code.
It might help you to find the error and fix it.
Best Wishes!
@@VijayThapa Hello Sir, I'm having the same problem even after rewatching the tutorial and comparing the code
Please Help Me!!
@sureddi mani1999 did you find a solution to your problem???
@@laurakagaba Please email me at hi@vijaythapa.com with the screenshot of your error and code.
Thanks and Regards!
@@VijayThapa Done Sir
Hello
I can't enter image in database by using your system but it doesn't help me, can you tell me another way??
Email me at hi@vijaythapa.com with the screenshot of your error and code.
Thanks and Regards!
Hey bro did u find any solution? I'm stuck at this and can't seem to find any solution. My image is not uploading in database as well as in the folder
I am having an error at the image name extension part. Error-Name can take only variable. But changes are visible in database. Also it is not redirecting to manage food page. Please help
It might just be an warning.
The actual error might be on redirection.
Please check the code there.
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 Thank you so much!!the error is solved. There was mistake in my redirection location😅
Hope you complete all the tutorials soon.
Best Wishes!
@@snehalpatil2001 hello, how did u fixed it?
Sir why is it whenever I put sql2 in executing the query I received Notice: Only Variables Shoul be passes by reference in C:\xampp\htdocs\food-order\admin\add-food.php on line 173
Do you get any other error?
Is your functionality not working?
Yes sir i have other error.
Notice: Only variables should be passed by reference in C:\xampp\htdocs\food-order\admin\add-food.php on line 173
Fatal error: Uncaught mysqli_sql_exception: Unknown column 'title' in 'field list' in C:\xampp\htdocs\food-order\admin\add-food.php:224 Stack trace: #0 C:\xampp\htdocs\food-order\admin\add-food.php(224): mysqli_query(Object(mysqli), 'INSERT INTO tbl...') #1 {main} thrown in C:\xampp\htdocs\food-order\admin\add-food.php on line 224
I can't move on to the next episodes because of this errors please help me sir
I already saw my error sir and fixed it! Thank you again sir!
@@carlapaulasanchez1679 Please email me at hi@vijaythapa.com with the screenshot of your error and code.
Sir, I have a Problem
Fatal error: Uncaught Error: Call to undefined function unlike() in C:\xampp\htdocs
estaurant-mangement\admin\delete-category.php:17 Stack trace: #0 {main} thrown in C:\xampp\htdocs
estaurant-mangement\admin\delete-category.php on line 17
How do I fix it?
I thin the error is while removing the image file.
It’s because the function name is unlink(); ✅
Not unlike() ❌
Hope you got it.
Best Wishes!
Sir thanks for your response
sir please make tutiorials for node js and mango db
Sir $Image_name did not come in database and no images in food folder how to solve the problem
Please check the code once gain. If needed watch the tutorial again and compare the code.
It might help you to find the error and fix it.
And if you couldn't fix the error, then email me at hi@vijaythapa.com with the screenshot of your error and code.
Best Wishes!
Hey bro did u find any solution? I'm stuck at this problem , please if u found anything please let me know
Why are we using value = and not value ?
In Which Section?
Anyway ID is always Unique but there might be more than 1 item with the same name.
Please learn more about Relational Databases.
Best Wishes!
At 28:18 ,thank you very much ,i understand it now !
I dont know why but my image is not uploading every single content is updated in the table apart from image_name and image is also not uploading in the food folder. Sir please help.
do you get any error messages?
@@VijayThapa i figured it out sir.... thanks.
@@SinghPratyush10 hey bro please help me with this , I'm also stuck with this problem for quite some time now and I'm not able to figure out a solution. I'm facing the same issue as u mentioned.
@@feet_investigatorr I have to look at it again bro....give me some time...its been 6 months and I don't remember what i did back then. I will get back to you after looking at the project again
@@SinghPratyush10 yeah sure no problem but please lemme know a lil sooner cuz I'm actually in a hurry rn. I Hope You'll help me out 😇
Sir how to remove the decimal digits in the price i just want to display only the number without decimal like ₹100 but not ₹100.00
In your database use int data type instead of decimal.
Hello sir
In add-food section data is save into database ,and as well as in the folder i created
But but in tab it won't redirect to manage food
And give error ,,
Only variables should be passed by reference 😑
I checked my code several times but didn't find error
Please send me the screenshot of your error message and code at hi@vijaythapa.com
Thanks and Regards!
sir i am getting error "Failed to add shoe". i am making a shoe order website. plz guide me. can i send the code and the db ss??
Please watch the video once again and try to compare the code.
It might help you to find the bug ad fix it.
Best Wishes!
@@VijayThapa sir i got the solution . bug was in the database. thank you for your support.
@@sagarnayak1577 You're welcome!
@@sagarnayak1577 can you tell me what the error? im still cannot add the item
sir i cannot go to browse in phpmyadmin why? please answer me
and failed to add food
If you cannot go to phpmyadmin, then you might have error in your local server (XAMPP).
If failed to add food, then you might have error somewhere in you code. Watch the tutorial once again and compare the code.
It might help you to find the error and fix it.
Thanks and Regards!
Thank you sir you're awesome teacher and great tutorial series I recommend it specially beginners will learn a lot here do like, share, and subscribe...
So nice of you
Hello sir. I have a problem with renaming images. I cpoied everything from your video, but it is giving just 0 in database instead of Food-Name. Could you help me please?
Don't just copy the codes. Try to understand them as well.
Please check the code ones again.
Are you getting the correct image name from image selection button?
If you're not getting the image name after selecting, other things won't work.
Check your if-else conditions.
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 thank you. I solved my problem. I did not give image_name in Mysql varchar, that is why it was not renaming and uploading
@@alinaalina3725 You're Welcome.
Best Wishes!
@@alinaalina3725 heyy please can u elaborate it ? I'm facing the same issue where my image is not getting updated in food folders as well as in database also sometimes when I only pass an image i get a SQL query error
Sir I'm stuck at one place!
That my image_name is not showing in database I've understand everything and i checked the code 3 times but still can't find anything, please help!
Note : I'm not getting any error too!
Did you mean, image not saved in database?
@@VijayThapa Yes, it wasn't saving in database but I figured it out now...
Thanks for cooperation!
Hey dude can u please help me with the solution? I'm also stuck at one place , my image is not uploading in database as well as in food folder . I'm also getting an Sql exception.
@@feet_investigatorr bro it might be fault in making the sql query I think...
Check if it's work.
@@abdurrehmanshaikh6868 no bro the SQL query syntax is correct . You said you figured it out so what was the error in ur code?
Images for add food page are not uploading, and $res2 not executing, help
Please check your enctype property for your form.
And watching the tutorial once again and comparing your code might be helpful to you to find the bug and fix it.
Best Wishes!
Can I get the full code zip??
@@nyyatee3963 Email me at hi@vijaythapa.com
I found my error, the names in db did not match in my code😂
@@nyyatee3963 Congrats!
Now, you'll complete the course soon.
Best Wishes!
How do you prevent the text on the Manage Menu Page from pushing the Action Button text to the next line?
What do you mean?
I couldn't understand?
Can you be more clear please?
Whenever you add more than 9 columns, the "Delete Category" get push to the next line. Is there away to prevent that from happening?
@@georgehayden2168 Give custom width to individual column.
Thanks
You can also use pathinfo() function for getting extension of file.।।
Thank you @Sachin for the suggestion.
I really appreciate it.
@@VijayThapa my pleasure.।।
can you fix this in this code $ext = end(explode('.', $image_name));
this is the error Notice: Only variables should be passed by reference in C:\xampp\htdocs\food-order\admin\add-food.php on line 163 please help
Send me screenshot of your error message at hi@vijaythapa.com
@@VijayThapa I can't send an image on @vijaythapa.com i already sent you my problem there.
$ext = end(explode('.', $image_name));
this is the error Notice: Only variables should be passed by reference in C:\xampp\htdocs\food-order\admin\add-food.php on line 163 that is my problem
@@jaquilynwalawala419 That's a warning not error.
So you must have other error as well.
Please check that as well.
@@jaquilynwalawala419
$ext = explode('.',$image_name);
$ext = end($ext);
You can try this.
good day sir, I emailed u about my problem in this part 1:07:42 pls help me sir thankyou
Hope you received my email.
I watched your tutorial
And it's very helpful in our project
But can I ask a question
How to fix if there's a notice like this only variables should be passed by reference in c:\xampp\htdocs\system\admin\add-food.php
And have a warning like this
Cannot modify header information
Just add the following code at the top of "constants.php" file
ob_start();
If you want to know more about the error and this code, then please follow the link below
www.vijaythapa.com.np/2021/08/how-to-fix-headers-already-sent-error.html
Thanks and Regards!
Sir can we get the source code to this video I can't really seem to debug the issue😭
Email me at hi@vijaythapa.com with the screenshot of your error and code.
what would be the query if we want to display category ?
Same as Foods, just replace the table name.
Please watch all the tutorials from 1-12, you'll understand the flow of this project.
Best Wishes!
Do you have any examples of "Add & Remove Table Rows Dynamically and inserting the data into MySQL using PHP"?
Have you watched all the tutorials (12) in this course?
It is not there in (12). I would like to add/delete Table Rows Dynamically. After adding all Rows, then insert into database
I found it and added it to my project. Thanks for the information.
i have an error.. the food added successfully but my image didn't show in my database and in my food folder what is my faul?
please reply when u can
In database we only save the name of the image.
You might have one of the following errors
1. Failed to Upload the Image
2. The link to display the image is wrong
So, please check the video once again more carefully.
It might help you to find the bug and fix it.
Best Wishes!
@@VijayThapa thank you
@@mariojreige4973 Thank you so much for following my courses.
Hope they were helpful to you.
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 Development for FREE.
Thanks and Regards!
@@VijayThapa yes of course thank you so much again, and i want to ask you if you can continue this website on your next work and update it to advanced php like ajax jquery.
You are not uploading any video for 1 year...
Why Vijay bhai...
Please come back....
I'lll try my best to make new courses as soon as possible.
Thank you so much for your love and support.
Sir in mysli_query($conn, $sql2)
$sql2 is not working why
Then you might have error in your SQL query.
Please check that.
If needed, watch the tutorial once again and compare the code.
Best Wishes!
Hello guys! Is there anyone that wrote this code with phpstorm and could open the image??
It might be the problem of your Code Editor.
@@VijayThapa Yes Sir Thank you. So thankful to you to what you are doing. Keep going!
sir I am getting an error :Undefined index: upload in /..............................l/admin/add_food.php
could you please help solve it !
You might have error in your upload variable.
Please watch the tutorial once again and compare the code. It might help you to find the bug and fix it.
Thanks and Regards!
When I Update the password its not a Update.
Show me Massege password do not match
Then you might have error in comparing the code or encrypting the code.
Please check the code once again, 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
Sir, I am getting an Error please help.....
Notice: Only variables should be passed by reference in C:\xampp\htdocs\food-order\admin\add-food.php on line 165
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\food-order\admin\add-food.php:100) in C:\xampp\htdocs\food-order\admin\add-food.php on line 207
At the top of constants.php, add the following code.
ob_start();
Best Wishes!
Hi,
I'm getting this warning, please help me to solve it.
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\food-order\admin\add-food.php:126) in C:\xampp\htdocs\food-order\admin\add-food.php on line 205
Adding following code at the top of "constants.php" might be helpful to you
ob_start();
Best Wishes!
@@VijayThapa that's mean i need to add only this code .. ob_start(); ..... into constants.php file ?
@@priankamondal1764 Yes, At the top of "constants.php"
@@VijayThapa it's work... thank you so much
@@priankamondal1764 You're welcome.
Hope you complete the course soon.
Also if you think the tutorials are helpful to you and can help others as well, then please SHARE.
It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
Thanks and Regards!