Thank you so very much, I was using another website to learn ajax, php etc and I had practically given up cuz I could really not understand what was going on. That's when I accepted a project I didn't have the knowledge for and that led me to your channel...never knew I could learn php and ajax from scratch and also complete a website within the deadline, your teaching made it possible.
Thank you for this great tutorial! Also love the channel! FYI: When the email gets send succesfully, the comment below is still the same warning as when all fields are empty. It should probably say something like: Email send succedfully..
Your lessons are truly the easiest to follow, in fact though I am yet to upload a website online, I had first come to understand and appreciate the fundamentals of php and web programming though your tutorials. Im currently working with XAMMP, developing a school web site that students can easily log into see their results. Been working on it since June 2020, and I must say for me, a person with zero experience in programming and not completing my university studies, your tutorials have given me confidence in myself in terms of my ability to learn newer and more difficult subjects. I hope to build my own social media application one day...Thank you Danny!......
Hey what an amazing explanation. I went through the documentation once before watching this and tbh I understood every single word you said. Hats off to you man, really amazing.
i really have to complain.. after watching your web dev videos it now became nearly impossible to watch the ones of others ;) really good content, and you always focus on the most essential aspects! Keep up!
This is great, I've been using it for a lot of different forms on my site, adding my own functionality. My only question is what should we do if we want to use the header(Location:) function upon successful submission, as with this setup it loads the new page into the form message div?
Thanks for your tutorial. Just one small detail. No need to define any method in when using Ajax. Because e.preventDefalult, prevents anything you define in the form. The "load" method in jQuery uses POST by default when sending a data object.
Daniel, once again, thank you very much. I built a similar form yesterday (BOOTSTRAP) using php and html. I can see the advantages of this method so will use this lesson to redo the form. Picked up some good points on styling as well. Thank you :-)
Very well done, thank you for your contribution to the community. Now that you've started this ajax series, Please consider to do a tutorial for a chat (for customer support or a social chat for your website)
Congrats on 100K subs by the way! You mention in this lesson that we can download the styles sheet in the description, but the link doesn't work anymore. Just letting you know so you can update it later. I've been going through a lot of your videos recently and they are really good. I still have a lot more to get through though. Keep up the good work! because these is some top notch coding lessons!
the video is really good, very well explained!! congrats. The only thing is that you din't tell how to send the email (php code), and I will really like to know how to do it with Ajax. I don't know if you have a video explaining this. Thank U!
You won't need it at all ! you can insert data in database through the PHP page that you put inside the function (#.form-message").load("pagePHP.php")...
thank you so much for this series...as always , your videos are the best...One more request . What would be the approach and some useful functions when trying to Refreshing comments and likes with ajax jquery automatically (e.g. every 10 secs)
thx a lot for this quality of videos , i mean the quality of informations you give ! it helps a lot a lot in terms on understanding how things work ! we learn a lot fo stuff in short time , and it also makes things clearer keep on with this kind of tutorial we really need someone like you ;)
Great explanation! As always... I'm wondering if you have same information about how to protect this kind of forms agaist CSRF attack. Do you have some episode about this issue? Thank you!!
Hey man awesome videos! Could you update the link to the Style Sheet? The one in the description is broken and I can't find them on your patreon, even after donating.
For those who wonder why you cannot pass data in load function to your php file, I found out that the syntax slightly changed. Now instead of doing {name: name, email: email..}, you have to do following: {'name': name, 'email': email...}. You just need to add items in that object to single quotes.
Heyo, really nice video, but i got one question left. Where do i insert the 'real' scrpt, which is sending the mail or insert the user into the db? Keep it up, my website is getting better and better just by using your tutorials :)
Great video's! But if I want to put the data of the form into a mysql database, do you have to enable the form POST method again? Or can Ajax handle this also?
$(".form-message").load(...), Here why we used the "form-message" in the selector ? .. why haven't we used another thing like the submit or the mail for example .. i mean what does that mean by select the message .. is that mean only the form message will be loading to the server ? and if i have used any other element like email input will it stop working? .. i mean when i apply this example on "login-form" .. which input should i select before load function ?
I like to use "const" for targeting elements (or other non-changeable content) and "let" for everything else what could or will be changed.. to be honest, I no longer use "var" at all.. main reason is hoisting and because the "let" have same behavior as variables in other languages..
I haven't seen this video through for a long time, but I think what you refer to is the JavaScript code I added. In that case then yes we can add JavaScript in PHP files :) However it is a good idea not to add JavaScript inside pure PHP script files. I'm not sure if I did that here in this video...
I think it works because the ajax will return everything which is echoed in the php + everything that is outside of the php tags. So it will basically embed the echo which is the span with the error message and the script outside of the php tags into the tag with the "form-message" class. (It works because you can place scripts with the tag anywhere in the html document i think) Embedding script like that even automatically sounds like bad style to me. Correct me if Im wrong though since Im just starting web development. Id rather try to return the booleans as JSON and let a script that is already loaded into the site handle it. But that would probably be much more challenging to work through.
Inserting Javascript code inside the PHP file will create a big issue with the response. The response string infact will contain also the JS code and this is not good if you want to handle the script with a if(response=ok) do this.
Hi. Hope you don't mind a few questions regarding your tutorial. 1) Can we use index.html instead of index.php? I don't see a reason why this needs to be a php file. 2) Do you see any problem with using an earlier version of jQuery prior to version 3.0 as I would like to use your example in my webpage that is based on a template using an earlier version of jQuery. 3) Does your PHP code properly sanitize the incoming contact information? I know just enough php to be aware that Cross Server Scripting attacks can occur when data in not filtered. I didn't hear any mention that your code is filtering all of the data. 4) A suggestion. Some type of spam security such as google's reCaptcha implement in your tutorial would gave been great. Thank you for a great video.
Nice one love your tutorials from php to ajax but please I plead that you prepare a video on a complete chat box with PHP, MYSQL and AJAX(i mean a live chat) thank you so much
Nice videos, Always helped me lots. Will you can create multiple fields value in one form (Like: text field, checkbox fields, image upload/multiple image upload) how to insert and edit all their values into database by using "AJAX". Kindly do it for us. Thank you very much.
great video, but at the last bit with mail.php at the last else with echo "span class=form-success" you never change the text to "Email has been sent". Unless correct me if i'm wrong
Thank you so very much, I was using another website to learn ajax, php etc and I had practically given up cuz I could really not understand what was going on. That's when I accepted a project I didn't have the knowledge for and that led me to your channel...never knew I could learn php and ajax from scratch and also complete a website within the deadline, your teaching made it possible.
Wonderful video. thanks so much for this. I find my website evolving with every video you post.
Thank you :)
12:18 and 29:40 information is very important for my project..... thx buddy
Thank you for this great tutorial! Also love the channel!
FYI: When the email gets send succesfully, the comment below is still the same warning as when all fields are empty. It should probably say something like: Email send succedfully..
same problem for me too.. did you find a way to print "email send successfully"??!!!
@@pravinram7896 Sorry, I haven't or just can't remember. Also I'm not using jQuery anymore...
@@DereckNoom it's ok bro... thank you for texting back! have a good day
I'm Italian and I know English not too well and I was looking for a solution for a project I'm carrying out. Congratulations, you're great
My CV looks good cause of your tutorials... thanx alot.
Your lessons are truly the easiest to follow, in fact though I am yet to upload a website online, I had first come to understand and appreciate the fundamentals of php and web programming though your tutorials. Im currently working with XAMMP, developing a school web site that students can easily log into see their results. Been working on it since June 2020, and I must say for me, a person with zero experience in programming and not completing my university studies, your tutorials have given me confidence in myself in terms of my ability to learn newer and more difficult subjects. I hope to build my own social media application one day...Thank you Danny!......
You explain with so much care!!!!.....love it....
I love this guy's teaching. Cool tutorials and explanations! Thumbs up man!
Couldn't believe it. I asked for this lesson last episode. Thanks a lot!!
Great bro! u just got me a step higher in programming experience!
Hey what an amazing explanation. I went through the documentation once before watching this and tbh I understood every single word you said. Hats off to you man, really amazing.
CTRL + Shift + D duplicates the line in sublime :)
Thanks I'll use that shortcut in the future :)
mmtuts yes it works with all editors. I think it works also to duplicates pix inside word file.
as usual, your tutorial was so elaborate, you leave no room for confusions. i was honestly wondering if the form is necessary. thank you !
i really have to complain..
after watching your web dev videos it now became nearly impossible to watch the ones of others ;) really good content, and you always focus on the most essential aspects! Keep up!
CSS file:
drive.google.com/file/d/1Xnrgi88S9CWaq5J7JTfuJ1pmy2Ro94UY/view?usp=sharing
you can see it at 19:48, so I transcribed it.
merci
This is great, I've been using it for a lot of different forms on my site, adding my own functionality. My only question is what should we do if we want to use the header(Location:) function upon successful submission, as with this setup it loads the new page into the form message div?
I usally don't comment videos, but Sir you helped me a lot !! Thank you so much!
yay thank you! I have watched this tutorial from the very first start and you are so amazing! Thanks! Merry Christmas! God bless you!
Thanks for your tutorial. Just one small detail. No need to define any method in when using Ajax. Because e.preventDefalult, prevents anything you define in the form. The "load" method in jQuery uses POST by default when sending a data object.
Jose Correct :) I explained that at the end og the episode.
Yes, I wrote the comment before finishing the video Too fast ;)
that was easy to understand . the video is wonderful. Asante sana
Thanks! Keep making videos. I suggest a video tutorial for game programming for web. :)
Daniel, once again, thank you very much. I built a similar form yesterday (BOOTSTRAP) using php and html. I can see the advantages of this method so will use this lesson to redo the form. Picked up some good points on styling as well. Thank you :-)
Your tutorial is very practical. I like it! Thank you!
This tutorial is very helpful thank you
Very well done, thank you for your contribution to the community. Now that you've started this ajax series, Please consider to do a tutorial for a chat (for customer support or a social chat for your website)
Dude lov your lessons, they are the freakin best!!
THANK YOU! You saved my life !
It is really awesome . Thanks man.
Thaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaank you so much for this incredible tutorial. YOU HAVE SAVE MY LIFE.
Download link is down :/
mmtuts, your videos r always amazing.
clearly understood 💕💕❤❤
Great videos , thanks alot :)
Congrats on 100K subs by the way! You mention in this lesson that we can download the styles sheet in the description, but the link doesn't work anymore. Just letting you know so you can update it later. I've been going through a lot of your videos recently and they are really good. I still have a lot more to get through though. Keep up the good work! because these is some top notch coding lessons!
That was a beautiful tutorial, thank you!
These videos are absolute gem, but once again, the style is not on the description anymore, would be amazing if you could upload them again
this videos always helping me
This tutorial is very helpful. But how to download this code. Given link showing error
Please give a tutorial on how to validate a multistep registration form in Javascript
You are the best of best
Thanks bro. really helpful.
Thanks! Keep it up
16:01 php tag is for server, not browser, awesome video thanks.
the video is really good, very well explained!! congrats. The only thing is that you din't tell how to send the email (php code), and I will really like to know how to do it with Ajax. I don't know if you have a video explaining this. Thank U!
thank you very much man❤
Thank you soo much, but how can you disable the preventDefault() so you submit the form when there are no more errors?
You won't need it at all ! you can insert data in database through the PHP page that you put inside the function (#.form-message").load("pagePHP.php")...
thank you so much for this series...as always , your videos are the best...One more request . What would be the approach and some useful functions when trying to Refreshing comments and likes with ajax jquery automatically (e.g. every 10 secs)
You are my teacher!
Please create a video on how to insert data to mysql with ajax, php at jquery
So this is the last eposide for AJAX bro? oh... I want to learn more about AJAX... thanks for your Good Lesson.
Nice one.Congratulation man!
Thank you for this tutorial, but the Error Message is not shown below the form, but on another page... How can I fix it? Thank you in advance.
Thank you so much 😌
thx a lot for this quality of videos , i mean the quality of informations you give ! it helps a lot a lot in terms on understanding how things work ! we learn a lot fo stuff in short time , and it also makes things clearer
keep on with this kind of tutorial we really need someone like you ;)
hi, could you make a video about "how to filter input from a commenting system using ajax (to secure your html by converting < and > into < and >)
cool video it helps me so much with ajax
hello wonderful short series of tutorial man :) i love it, but you said you were gonna do also AJAX using JavaScript but I can not find it :(
Thank you for your tutorials, I'm learning a lot watching your lessons!
Is it possible for you to make a CRUD tutorial, or to post some examples??
welldone my friend keep going , nice one
Great explanation! As always...
I'm wondering if you have same information about how to protect this kind of forms agaist CSRF attack.
Do you have some episode about this issue?
Thank you!!
*Cool video. Would you please make a **_Chat System_** in near future?*
amazing video.....Thanks man
Thank You Brother
Wow super ...thanks lot brother
Hey man awesome videos! Could you update the link to the Style Sheet? The one in the description is broken and I can't find them on your patreon, even after donating.
Same here.
Excellent and easy to understand but still very practical video. Thank you very much. Keep up the good work. :-)
Please do a video how to insert data into a MySQL database with ajax and jquery! Your tutorials are fantastic. @mmtuts
Uppskattar dina lektioner enormt mycket, tack!
unfortunately my form is redirecting to a new page, but your tutorial did help
Im experiencing the same.
same for me
For those who wonder why you cannot pass data in load function to your php file, I found out that the syntax slightly changed. Now instead of doing {name: name, email: email..}, you have to do following: {'name': name, 'email': email...}. You just need to add items in that object to single quotes.
Heyo,
really nice video, but i got one question left.
Where do i insert the 'real' scrpt, which is sending the mail or insert the user into the db?
Keep it up, my website is getting better and better just by using your tutorials :)
The links to the downloads give an error, where can I get the downloads from, I've check the patreon and they're not there either.
you are great … where ajax with javascript I can’t find it anywhere in ur channel
please make the video about how to make a chat box...
Please create more videos on Ajax
Hey awesome video. Are you going to do a video about live editing a Table
do you have a tutorial for installing the live server for php, the sql database... to follow along? Great videos by the way. Thanks
Great video's! But if I want to put the data of the form into a mysql database, do you have to enable the form POST method again? Or can Ajax handle this also?
instead of showing message on same page it is redirecting me to the next page which i redirected in form element
i got the same problem as manoj kumar .. but to use the jquery code inside of the html file is still not working for me .. any suggenstions?
i have the same problem.. can someone help me?
$(".form-message").load(...), Here why we used the "form-message" in the selector ? .. why haven't we used another thing like the submit or the mail for example .. i mean what does that mean by select the message .. is that mean only the form message will be loading to the server ? and if i have used any other element like email input will it stop working? .. i mean when i apply this example on "login-form" .. which input should i select before load function ?
I like to use "const" for targeting elements (or other non-changeable content) and "let" for everything else what could or will be changed.. to be honest, I no longer use "var" at all.. main reason is hoisting and because the "let" have same behavior as variables in other languages..
In the end,you add a in the php backend file,which makes me a little confused.Can we do like that at anywhere?Or there are some rules.
I haven't seen this video through for a long time, but I think what you refer to is the JavaScript code I added. In that case then yes we can add JavaScript in PHP files :) However it is a good idea not to add JavaScript inside pure PHP script files. I'm not sure if I did that here in this video...
I think it works because the ajax will return everything which is echoed in the php + everything that is outside of the php tags. So it will basically embed the echo which is the span with the error message and the script outside of the php tags into the tag with the "form-message" class. (It works because you can place scripts with the tag anywhere in the html document i think) Embedding script like that even automatically sounds like bad style to me. Correct me if Im wrong though since Im just starting web development. Id rather try to return the booleans as JSON and let a script that is already loaded into the site handle it. But that would probably be much more challenging to work through.
Inserting Javascript code inside the PHP file will create a big issue with the response. The response string infact will contain also the JS code and this is not good if you want to handle the script with a if(response=ok) do this.
Hi. Hope you don't mind a few questions regarding your tutorial. 1) Can we use index.html instead of index.php? I don't see a reason why this needs to be a php file. 2) Do you see any problem with using an earlier version of jQuery prior to version 3.0 as I would like to use your example in my webpage that is based on a template using an earlier version of jQuery. 3) Does your PHP code properly sanitize the incoming contact information? I know just enough php to be aware that Cross Server Scripting attacks can occur when data in not filtered. I didn't hear any mention that your code is filtering all of the data. 4) A suggestion. Some type of spam security such as google's reCaptcha implement in your tutorial would gave been great. Thank you for a great video.
Nice one love your tutorials from php to ajax but please I plead that you prepare a video on a complete chat box with PHP, MYSQL and AJAX(i mean a live chat) thank you so much
Nice videos, Always helped me lots. Will you can create multiple fields value in one form (Like: text field, checkbox fields, image upload/multiple image upload) how to insert and edit all their values into database by using "AJAX".
Kindly do it for us. Thank you very much.
can I use separated parallel check with PHP and jquery?
Nice work
Great video, but Lesson files are not available ??!!! Help please.
great video, but at the last bit with mail.php at the last else with echo "span class=form-success" you never change the text to "Email has been sent". Unless correct me if i'm wrong
Thank you bro 😍 but i have a Q in script tag idon’t have form-message what I write on .load()
How do you clear all values from the form after submission?
amazing videooo guys. i like video
Hi , thanks for your videos , learned so much :) can you do a AJAX +Laravel tutorial next ?
Thanks a lot man, you're the best ! :D
can we use $.post instead of load?
did i just hear you take a sip of coffee at the very end? XD
Definitely he did :}
@@domnsync verdade amigo , obrigado .... !! kskskssk
@@KaikSilva_Ss 😉
Sir, please create ajax upload progress tutorial.
Thanks for this wonderful tutorial, how can I use this validation method in WordPress with action="" ?
Thanks. I wonder why you didn't use "post" in ajax! Everywhere i looked they all used it. What's the difference please?