Huge thank you. I literally had no experience with PHP (at all) and I used your lesson to teach myself how to edit a form submission page PHP script generated by a block editor program (Nicepage) and get it to work first time! Crystal clear instruction. Thank you!
Thank you! Thank you ! Thank you! I just wrote this script and it works wonderfully. This is after getting 3-5K quotes from developers. I migrated servers and the old server was using an outdated "perl" script to process forms. I cannot tell you how helpful this video was for me! Thank you Andrew!!!
Follow andrew's tutorials are the best i have learned so much stuff in this channel ! Hope you'll continue php tutorials and responsive tutorial with other projects 👌
Thanks man, this video really helped me! Thank ya very much! I never knew how that css thing worked, I used to think that's something of a js thing! Now I know it is a css property!
This is very very very helpful, specially going through the logic of the code that u typed everytime, it really makes it so clear and understandable. I cannot thank you enough for your effort. here's a like and a subscribe :)
Hi. Nice video. I have a question though.Is your validation part " $_POST['email'] != ' ' " like this necessary ? Because array is true only if its not empty right ? So if we write just " if($_POST['email']), it should do the same ?
Hi Sir! I really like how you explain things, keeping in mind that a lot of newbies might be checking this tutorial out. Thank you. I have a question, I created a landing page with a contact form. It has a file name index.html. I want to make the contact form work, should I then change it to index.php for it to be a fully funtioning contact form?
Hi Andrew first of all thanks a lot for your excellent sharing. Video is excellent. I just want to highlight the diffulities I face to implement it. On your provided github repository there is no webform.php file present. One more thing to point, some description is required for the code in the main.js file. This main.js which is present on github repository.
Hi. I would like to thank you for this video. Nicely explained. I would also ask if you have also working example of PHP form that would actually send an email to a customer who submitted the form, not only to the owner, but to both ... Thank you
Hi Andrew, thanks for the tutorial! Everything worked for me up until the point where I start to add the last if, else and endif statements. I get a "localhost can't run this.. http 500 error" message when I reload. I'm running this via MAMP, is that the reason it doesn't work?
not working. Downloaded your form html, js, css etc. completed php but I keep receiving a 405 error when running the php/html on my local system and and 404 error when I am hosting my website . The mail cannot be sent or received. Could you tell what the problem is??
Thank you for this! Quick question, all of the emails from my domain/host are forwared to my gmail account but they are all going to my spam folder. How do I fix this? Thank you for the help!
why wont it send to my email Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Users\asus\Desktop\php program convert\htdocs\amitprograms\exhaustedwebsite.php on line 43
What I don‘t catch is how does the «$message_sent» variable is related to the mail function. Semantically, yes, but how do I know if $message_sent = TRUE, really means that the message was sent? All the rest was explained nicely.
Excellent tutorial, could not get the "php" code from the Github page you provided though, just the html version of the page. Is it available elsewhere? Thanks!
Posted this on my IIS server and it does not work. IT does not throw an error but the email is never received. I tried my godaddy domain, google and, yahoo and the email never arrives. I have been tried this email form on dozens of different configurations and servers and it never works.
Hi Andrew, I enjoyed your tutorial . I have a question.. how can you add attachment to the form to send email with attachments . Also can you connect this to MySQL to see the sent emails ? Thank you
I am very glad to have come across your tutorials. Actually I was looking for a tutorial on how to add a subscribe and activate for newsletter . Can I use this tutorial for this purpose and what should i change to that ? Than you very much in advance
Thank you soo much. Mine worked perfectly. But i have a question: When i received the message in my mail, the username is that of my Server's instead of either a name. Can you pls help me with that.
Congratulations on this tutorial. I'm a PHP newbie but can follow along for the most part if I watch repeatedly. One question, however: Is adding the variable $body necessary? I think it is simpler to use $message as the third parameter of the mail function. Am I right?
Yes, also most of developers use $message as the third parameter and is REQUIRED. For semantic reasons, developers use: $to, $subject and $message as parameters names, for convention, but it doesn‘t have to be like this, necessarily. You saw how this video used $body instead of message, and $messageSubject instead of just $subject. You name them whatever you want, but three of them, in the strict order, have to be included. The first parameter is for the email destination of the form, that will go to the box of the TO in the mail application. The same for the SUBJECT. Whatever you put as the second parameter will go in the SUBJECT field of the email app. Additional headers are optional but recommended to get better organized. Obviously, when you called the mail functions, use the parameters names you are using: mail ($first_parameter_destination_email, $second_parameter_topic_name, $third_parameter_content_message);
Amazing content as always and very helpful! Though, one question. How would you suggest with javascript to print the "thank you your form submitted" somewhere discreet in the same page where the user hasnt to redirect to another page
Thanks for a great tutorial, works great after setting up sendmail in php and adding a from in the mail (using yahoo). However, after sending the email and getting the success message “Thanks we will be in touch” If I refresh the page the email is sent again, and I get the success message again but cannot see the form. How can this be fixed? Thanks
This is the best tutorial I have found so far to accomplish email form collection.. question how do you video yourself in the corner without anywithout any background? I know how to do it with picture in picture but the way you do it is really really cool can you share how you do that
Love the tutorial, thanks! As styling of select boxes sucks, I used divs with a little javascript. How could one use the selected list item as a variable? Thanks in advance!
Hey man, thank you for your videos! I'm learning a lot. This tutorial was easy to follow along and you also break everything down. this worked up until I took the comment on mail($to,$messageSubject,$body) $message sent=true; the browser spits !*Parse error: syntax error, unexpected '$message_sent' (T_VARIABLE) in C:\php\htdocs\Developer Layouts\webform.php on line 21*! out. Can you please explain what I missed? Also for a future video you could go over MySQL and how to stick the input of forms go into the database. Thanks again.
Hi @FollowAndrew, I just wanted to ask how secure this method is. Is this super secure, or are there 'more' secure ways of doing it? I'm handling sensitive data under UK GDPR so I'm conscious of using the most secure methods possible. Thank you!
Andrew. So I have Visual Studio Code along with my own host via Hostinger in which i made a temporary webform.php. However when I use your provided code in studio code than submit the data. I'm not getting an array. It literally is showing in the live preview in html format behind the form the PHP script...am i doing something wrong...how do i get the array showing like yours?
Great tutorial. Maybe to many information for simply form. Do you have simple form working tutorial? And one thing I CANNO'T understand yet, do I need create form with .php if I want working form on server side? Because I created my webpage with .html Do I need firs of all to change to .php??? Because other way nothing happens to me
you need php tags ,php is a server language ,say file name email.php,localhost/email.php,hopefully works,html is basic programing ,to display it you don't need server ,right click and display in browser.
Hi, thank you for the good video, I copied it really easily, but I'm going to link the file I copied to the html file and put the context part under the html file, can you tell me how to do it?
Hello, I love the tutorial! However, I have a problem. Everything works perfectly, but when I receive the email all of the inputs are blank. Example, name comes back as 'Name: " with no context. Is there something else I must do on the back end of my server, outside of the php? I noticed you had a link to AJAX in your head, is this necessary for the form to function? Thanks!
Hello Sir, My name is harsh. i'm making a contact-us form with html, css and php. i have a question on 6:20 sir can you tell me how can i write first and last name and phone number in $ form? example $userEmail = $_POST['email']; so can you explain me sir how to write this code? sir can you help me to figure out this code?
in the example you succeeded sending the email with the commented line: mail($to, ......), but to works you have de not comment right?, i tried instead not commented that line, but didn't work for me, i had every line of code as you have have, but not works for me.
Something a bit different today: PHP contact form with email! Comment, like, & subscribe!!
it works with github pages server?
Huge thank you.
I literally had no experience with PHP (at all) and I used your lesson to teach myself how to edit a form submission page PHP script generated by a block editor program (Nicepage) and get it to work first time!
Crystal clear instruction.
Thank you!
Have you include checkboxes or multiple select options in your form? Are you in Stackoverflow?
Thank you! Thank you ! Thank you! I just wrote this script and it works wonderfully. This is after getting 3-5K quotes from developers. I migrated servers and the old server was using an outdated "perl" script to process forms. I cannot tell you how helpful this video was for me! Thank you Andrew!!!
Thank you so much, so many tutorials out there that do not work and yours was so easy to follow
Exactly what I needed! I know literally zero PHP but it worked first try. Thank you!
Great to hear!
Ok, but how do you make to so you ACTUALLY receive an email, cuz that bit doesnt seem to work when i try it, nor do you show that.
i searched for this keyword and i found you and you know what you are awesome amazing
Thanks for explaining the logic behind easy to understand!
You are great. I am happy I discovered your channel.
Thank you. Thank you. Thank you. Thank you so much for this video. You're the best teacher on net!
Your tutorials are different & very helpful, thanks a lot.
You are welcome!
Follow andrew's tutorials are the best
i have learned so much stuff in this channel !
Hope you'll continue php tutorials and responsive tutorial with other projects 👌
love the way you are explaining stuff! thank you
I am completely a novice at this, but your explanation is comprehensible. Thank you!
Glad it was helpful!
Another awesome tutorial.. now to finish off validation and get this bad boy online
Your tutorials are really awesome thanks for the hard work you are putting in. Love from India
This is exactly what I was looking for, thank you!
Amazing tutorial. Straightforward & to the point.
Thank you so much. One of the few people who explain php so good. :)
Thanks a bunch for this video. It worked on a live server.
You explain very well and detailed.
Very functional bro to send campaign emails.
Muchas gracias!! From Chile!! I appreciate your video so much!
Great tutorial,Andrew -really things easier for me.
Thanks man, this video really helped me! Thank ya very much! I never knew how that css thing worked, I used to think that's something of a js thing! Now I know it is a css property!
I don't know what I'm doing here, but I can tell you that this is so f*cking entertaining
This is very very very helpful, specially going through the logic of the code that u typed everytime, it really makes it so clear and understandable. I cannot thank you enough for your effort. here's a like and a subscribe :)
Thank you very much this video help me a lot! interesting! and also you explain good and make it easy to understand.
is the code for this validation on the github because right now i can only find the html, (thanks for the help andrew!!)
Awesome, thank u!
Hi. Nice video. I have a question though.Is your validation part " $_POST['email'] != ' ' " like this necessary ? Because array is true only if its not empty right ? So if we write just " if($_POST['email']), it should do the same ?
I liked, commented and subscribed! Thanks!!!
Very clear, good information, great tutorial, thanks, I subscribed!
Welcome!
Hi Sir! I really like how you explain things, keeping in mind that a lot of newbies might be checking this tutorial out. Thank you.
I have a question, I created a landing page with a contact form. It has a file name index.html. I want to make the contact form work, should I then change it to index.php for it to be a fully funtioning contact form?
Yes change it to index.php and then make form validations and send email :)
@@mohamadSalahia Hey! That’s very kind of you. Thanks
@@NorlynCodes Your welcome :)
Thanks for making this video! Is that email validation code in php also necessary when “required” is already used in the input HTML?
Perfection! Great job! Amazing tutorial!
How can I use this PHP with an external file?
Perfect tutorial, thank you for this!
Great tutorial, really helped me to understand forms and e-mail validation :)
Glad you liked it!
Well Done SIR!
Thank you very much for this tutorial, and waiting for more interesting !!!
Hi Andrew first of all thanks a lot for your excellent sharing. Video is excellent. I just want to highlight the diffulities I face to implement it.
On your provided github repository there is no webform.php file present. One more thing to point, some description is required for the code in the main.js file. This main.js which is present on github repository.
One of the best Tuts. Thanks
Hi.
I would like to thank you for this video. Nicely explained.
I would also ask if you have also working example of PHP form that would actually send an email to a customer who submitted the form, not only to the owner, but to both ...
Thank you
Thank you for your time and effort. Could you pls explain how to setup the smtp, server name, username, password, port number of the sender?
Hi Andrew, thanks for the tutorial! Everything worked for me up until the point where I start to add the last if, else and endif statements. I get a "localhost can't run this.. http 500 error" message when I reload. I'm running this via MAMP, is that the reason it doesn't work?
not working. Downloaded your form html, js, css etc. completed php but I keep receiving a 405 error when running the php/html on my local system and and 404 error when I am hosting my website . The mail cannot be sent or received. Could you tell what the problem is??
It works! It works!
what server did you used ?
@@MourideGoor Apache
I love your tutorial Andrew, Thank you for such detailed information on how we really do this! You're great man!
I appreciate that!
Thanks so much for this, it was awesome. It helped me a great deal. I hope you'll touch on phpMailer soon.
Thank you for this! Quick question, all of the emails from my domain/host are forwared to my gmail account but they are all going to my spam folder. How do I fix this? Thank you for the help!
Thanks a lot Sir :)
11:42 So, if you don‘t set the
if isset function on the top, the form could be sent just with empty fields? Is for that the isset function?
This works perfectly, thanks!
why wont it send to my email Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Users\asus\Desktop\php program convert\htdocs\amitprograms\exhaustedwebsite.php on line 43
@@rashaadmyrieckes1506 host it!
What I don‘t catch is how does the «$message_sent» variable is related to the mail function. Semantically, yes, but how do I know if $message_sent = TRUE, really means that the message was sent? All the rest was explained nicely.
Great Work Andrew, it really helped me a lot... Thanks for this.
You're very welcome!
You didn't enable the mail(). Did it still send without it being in use?
i think so
Thank you so much... this was an amazing tutorial! Exactly what I needed, at the pace I needed. :)
You're so welcome!
Great tutorial, Andrew - really made things easier for me :-)
Thank you very much for your wysiwyg tutorial and waiting for more interesting staffs :)!
Excellent tutorial, could not get the "php" code from the Github page you provided though, just the html version of the page. Is it available elsewhere? Thanks!
Posted this on my IIS server and it does not work. IT does not throw an error but the email is never received. I tried my godaddy domain, google and, yahoo and the email never arrives. I have been tried this email form on dozens of different configurations and servers and it never works.
Same here. Does anyone have idea why mail not received?
Hi Andrew, I enjoyed your tutorial . I have a question.. how can you add attachment to the form to send email with attachments . Also can you connect this to MySQL to see the sent emails ? Thank you
I am very glad to have come across your tutorials. Actually I was looking for a tutorial on how to add a subscribe and activate for newsletter . Can I use this tutorial for this purpose and what should i change to that ? Than you very much in advance
Andrew - Great Video, however, I couldn't find the video on the form itself. Can you direct me to it so the next time I can follow along?
Thank you soo much. Mine worked perfectly. But i have a question: When i received the message in my mail, the username is that of my Server's instead of either a name. Can you pls help me with that.
We do that. Happy to save you from the programming involved!lol! Email response and simple code generation.
Thank you very much!
Congratulations on this tutorial. I'm a PHP newbie but can follow along for the most part if I watch repeatedly. One question, however: Is adding the variable $body necessary? I think it is simpler to use $message as the third parameter of the mail function. Am I right?
Yes, also most of developers use $message as the third parameter and is REQUIRED. For semantic reasons, developers use: $to, $subject and $message as parameters names, for convention, but it doesn‘t have to be like this, necessarily. You saw how this video used $body instead of message, and $messageSubject instead of just $subject.
You name them whatever you want, but three of them, in the strict order, have to be included. The first parameter is for the email destination of the form, that will go to the box of the TO in the mail application. The same for the SUBJECT. Whatever you put as the second parameter will go in the SUBJECT field of the email app.
Additional headers are optional but recommended to get better organized. Obviously, when you called the mail functions, use the parameters names you are using: mail ($first_parameter_destination_email, $second_parameter_topic_name, $third_parameter_content_message);
Amazing content as always and very helpful! Though, one question. How would you suggest with javascript to print the "thank you your form submitted" somewhere discreet in the same page where the user hasnt to redirect to another page
By using AJAX
Thanks for a great tutorial, works great after setting up sendmail in php and adding a from in the mail (using yahoo). However, after sending the email and getting the success message “Thanks we will be in touch” If I refresh the page the email is sent again, and I get the success message again but cannot see the form. How can this be fixed? Thanks
Why am I not receiving messages in my mail?
This is the best tutorial I have found so far to accomplish email form collection.. question how do you video yourself in the corner without anywithout any background? I know how to do it with picture in picture but the way you do it is really really cool can you share how you do that
Hey you - Google: Green screen video :)
Love the tutorial, thanks! As styling of select boxes sucks, I used divs with a little javascript. How could one use the selected list item as a variable? Thanks in advance!
you can set a class on virtually anything. for example -
Thanks dude
The best video🌹
Hey man, thank you for your videos! I'm learning a lot. This tutorial was easy to follow along and you also break everything down. this worked up until I took the comment on mail($to,$messageSubject,$body)
$message sent=true;
the browser spits !*Parse error: syntax error, unexpected '$message_sent' (T_VARIABLE) in C:\php\htdocs\Developer Layouts\webform.php on line 21*! out.
Can you please explain what I missed?
Also for a future video you could go over MySQL and how to stick the input of forms go into the database.
Thanks again.
How would you incorporate checkboxes in the php portion? I can add the html for checkboxes but can't seem to work out how to get 'check' to work.
Hi @FollowAndrew, I just wanted to ask how secure this method is. Is this super secure, or are there 'more' secure ways of doing it?
I'm handling sensitive data under UK GDPR so I'm conscious of using the most secure methods possible. Thank you!
muito obrigado , aula muito boa , Brasilll
Thank you!
Andrew. So I have Visual Studio Code along with my own host via Hostinger in which i made a temporary webform.php. However when I use your provided code in studio code than submit the data. I'm not getting an array. It literally is showing in the live preview in html format behind the form the PHP script...am i doing something wrong...how do i get the array showing like yours?
Hey Andrew can you help me i just buy cv portfolio the send message is not working how to fix this i'll send you the picture
I loved this tut! Thanks for sharing. Liked, Shared, and subscribed. :D
How Do I change the css that you wrote?
I had follow everything you had said and in the beginning it was working but now my page is not loading properly.
i followed your text exactly, and the form errors out.
Great tutorial. Maybe to many information for simply form. Do you have simple form working tutorial? And one thing I CANNO'T understand yet, do I need create form with .php if I want working form on server side? Because I created my webpage with .html Do I need firs of all to change to .php??? Because other way nothing happens to me
you need php tags ,php is a server language ,say file name email.php,localhost/email.php,hopefully works,html is basic programing ,to display it you don't need server ,right click and display in browser.
Thanks
Welcome
Hi, thank you for the good video, I copied it really easily, but I'm going to link the file I copied to the html file and put the context part under the html file, can you tell me how to do it?
Hi,
It is not working for me at all.
thanks, help me loads
Part 1 is HERE - ua-cam.com/video/JQ_WphOV9VQ/v-deo.html
Hello, I love the tutorial! However, I have a problem. Everything works perfectly, but when I receive the email all of the inputs are blank. Example, name comes back as 'Name: " with no context. Is there something else I must do on the back end of my server, outside of the php? I noticed you had a link to AJAX in your head, is this necessary for the form to function? Thanks!
Hello Sir, My name is harsh.
i'm making a contact-us form with html, css and php.
i have a question on 6:20
sir can you tell me how can i write first and last name and phone number in $ form?
example $userEmail = $_POST['email'];
so can you explain me sir how to write this code?
sir can you help me to figure out this code?
in the example you succeeded sending the email with the commented line: mail($to, ......), but to works you have de not comment right?, i tried instead not commented that line, but didn't work for me, i had every line of code as you have have, but not works for me.
thank you bro..! I'm subscribing for more..
What song is that intro?
What software/IDE are you using? I am new at this so I don't know
Visual Studio Code look at Andrews channel videos "Top 12 Best VS Code Extensions (2020)"
Do they send to GMAIL's?