58: How to Create A PHP Contact Form | PHP Tutorial | Learn PHP Programming | HTML Contact Form

Поділитися
Вставка
  • Опубліковано 3 гру 2024

КОМЕНТАРІ • 866

  • @remsan03
    @remsan03 3 місяці тому +1

    I've spent the entire day trying to make my contact page works. Only this guy helpfully mention that Gmail can't receive any mail sent directly from php. My head hurts checking every line of code, thinking there's something wrong. The solution actually was so simple: use an email from your domain for $mailTo. Thank you, and I'm subscribing.

  • @ThePublicTutorials
    @ThePublicTutorials 7 років тому +83

    Hey, I love how you actually get straight to the point and actually make videos with useful real life examples and not just speak theory or demonstrate cases that have no real life abutment! Your videos saved me from failing one of my uni courses. Thanks alot! If I were to be pointy about your tutorials I'd say that I wished you started off with showing the result (So that we can skip the video if it wasn't what we were looking for). But keep up the amazing content!

  • @mohanmariswamy1321
    @mohanmariswamy1321 3 роки тому +13

    I was worried to not learning this since so many years as I was only concentrated on front end development. Thanks Dani :)

  • @83greene
    @83greene 6 років тому +14

    Thank you so much for this video! I am complete php newbie trying to create php contact form on my website. I watched so many tutorials and I couldn't get it worked. Why? I tried to send email to my gmail address. Thank you for explaining that it won't work with Gmail! That just saved me whole afternoon of frustration!

    • @abiodunfakunle4791
      @abiodunfakunle4791 6 років тому +1

      but pls how do u did that, co's i have tries it but is not working

  • @haoql.7686
    @haoql.7686 2 роки тому +2

    I just like how easy and basic this video is to an absolute beginner of learning PHP.
    Thanks for making this video!

  • @suchiparekh5190
    @suchiparekh5190 6 років тому +5

    I have watched at least 10 videos before yours. you showing perfect all the thing. all the things you explained, I understand very easily and its working finally. thank you, soo much. you are god for me. your video made my day.

  • @chibututunnamani5806
    @chibututunnamani5806 5 років тому +6

    I'm in love with the way you teach bro! I read books but you've made me a more confident php developer. Much love bro! Thanks for the great work!

  • @robcandy9273
    @robcandy9273 4 роки тому +16

    Was trying to do this last. Would not work. Not at all. Went to bed miserable. Woke up this morning refreshed with coffee and tried again... Still wouldn't work. After swearing loudly for a few minutes I notice something. One quotation mark missing!!! AAARGH This is why I'll never make a professional programmer :P It works perfectly now. Thanks for this tutorial

    • @DH-qu8wh
      @DH-qu8wh 4 роки тому +2

      repeat this process several hundred times and you will be a professional.

    • @natking1u1z99
      @natking1u1z99 2 роки тому

      I bet you code professionally now, do you?

  • @dayoldtortillas9345
    @dayoldtortillas9345 2 роки тому +2

    Great instruction, right to the point. No messing around makes this very useful and user friendly. Thanks for a great lesson.

  • @mellmckn
    @mellmckn 6 років тому +43

    Love your course! I'm new to php and this is very helpfull.

    • @gunnerjeremiah892
      @gunnerjeremiah892 3 роки тому

      you all probably dont give a shit but does someone know a way to log back into an instagram account?
      I stupidly forgot the login password. I would appreciate any tricks you can give me!

    • @HaanBerry
      @HaanBerry 2 роки тому +2

      @@gunnerjeremiah892 use the forgot password button lol

  • @billbyrd9845
    @billbyrd9845 4 роки тому +1

    Absolutely the best tutorial for contact form on the entire web! Thank you!

  • @milijanaderic2271
    @milijanaderic2271 3 роки тому

    Thank you Dani! Thanx to your video, I managed to make a contact form on my portfolio web site working!

  • @tommyp2135
    @tommyp2135 6 років тому +3

    I been looking for hours to my question "Can i test my PHP form using local host? " Thank you for giving the answer =)!

    • @Dani_Krossing
      @Dani_Krossing  6 років тому +1

      Yes but it require quite a bit of setup

  • @alexanderkwasiamoah1104
    @alexanderkwasiamoah1104 3 роки тому

    I actually got this one straight after many attempts using other videos. Thanks.

    • @drakZes
      @drakZes 3 роки тому

      How did you get it right, please, I have tried everything

  • @warrithshabazz8495
    @warrithshabazz8495 4 роки тому

    My mistake was not capatilizing the POST inputs haha Thank you so much buddy. Its working!!

  • @DesmondloveSonita
    @DesmondloveSonita 9 місяців тому

    I really love your manner of presentation and teaching sir

  • @iurukrod9938
    @iurukrod9938 4 роки тому

    You are the one youtuber I was looking for.

  • @trg808
    @trg808 5 років тому +25

    Hey this works with my Gmail! Don't know if anything has changed but just wanted to give a heads up.

    • @hananebouidia6485
      @hananebouidia6485 4 роки тому

      Hello can you please tell me how it wirked for you with gmail ?? because don't want to work for me !!

    • @aangaimbot1498
      @aangaimbot1498 4 роки тому

      PLS TELL ME HOW THE HECK IT WORKED FOR YOU PLSPLSPLSPLSPLSSSSSSSSSS

    • @aangaimbot1498
      @aangaimbot1498 4 роки тому

      @RUSAFI BUT HOW

  • @shampoable
    @shampoable 6 років тому

    Works like a charm from the first time

  • @beenyshsaeed4559
    @beenyshsaeed4559 2 роки тому

    Thank you for explaining clearly and precisely.

  • @emreklcaslan4184
    @emreklcaslan4184 3 роки тому +1

    Thanks from Turkey :)

  • @samnatangweshingenge7370
    @samnatangweshingenge7370 3 роки тому

    Struggling years and years ,Thank you Bro

  • @regularpersonLIVE
    @regularpersonLIVE 10 місяців тому

    Sometimes I feel that you teach way better than others

  • @sivap8984
    @sivap8984 5 років тому

    By visiting your channel I am learning usefully day by day.

  • @nlawson2004
    @nlawson2004 5 років тому

    Damn it. It was the Z index value in the CSS. Everything is perfect again. Hopefully these posts will help someone else who’s having similar issues. So madenning.

  • @Levibailey75
    @Levibailey75 4 роки тому +1

    Play the video and keep tapping the number 2.. so satisfying

  • @grsescueladepatinaje2768
    @grsescueladepatinaje2768 6 місяців тому +1

    First of all, I'd like to thank you for your excellent work, which makes the incomprehensible so easy. However I have a problem, the last 2 lines of code cause a syntax error that I can't fix. Thank you in advance for your reply.

  • @verakorchemnaya3971
    @verakorchemnaya3971 2 роки тому

    Very good, easy to follow video! The only video anyone needs on this subject, thank you!

  • @issarukayat5992
    @issarukayat5992 6 років тому

    You are an angel. Your method of impacting knowledge is awesome. I really appreciate all your tutorials. I have learnt alot from watching your video. I am new in programming. Thanks alot.

  • @hellangel28
    @hellangel28 5 років тому +4

    This is a tutorial to show how easy it is to send an email via PHP using native functionality, though it is not secure at all.
    Do not use a contact formular like this in any production/live environment!
    If you do not sanitize the user input, additional sendmail parameters can be injected, making it possible to remotely execute arbitrary code! I would highly recommend to use packages like PHPMailer or similar, which include mitigations against this type of attacks.

  • @dougduran4591
    @dougduran4591 6 років тому +2

    Best programming channel ever! You make PHP fun and easy like never seen before

  • @iajoe9077
    @iajoe9077 8 місяців тому

    The way you teach us is super good and open Sir ❤.
    Thank you so much

  • @maaiziyas9854
    @maaiziyas9854 4 роки тому +8

    Hi, I would be grateful if you could make a tutorial on a functional shopping cart

  • @mettalove
    @mettalove 6 місяців тому

    Thank you so much for providing tutorials for beginners. I'm happy you explain every step and don't skip over things. Now, have you made a video that shows how to add V2 checkbox recaptcha into a php/html contact form. I have a functioning form but have no idea where to place all of the code. Watching your html and php form videos is teaching me about my form in the meanwhile.

  • @CountingSheepsTonight
    @CountingSheepsTonight 6 років тому +1

    It's a really reallyyyyyy good tutorial! Well done! You can be sure that I will come back and watch each tutorial (you can say that I have come here for a refresh tutoring and you've passed it big time!)

  • @HASSANMUSTAFAhass797
    @HASSANMUSTAFAhass797 7 років тому +10

    I learned a lot from you , thanks Man

  • @samuelxo2569
    @samuelxo2569 4 роки тому +1

    This was the most useful tutorial ive seen for this thanks so much

  • @dominicsanchez2633
    @dominicsanchez2633 6 років тому +2

    You have a potential to be a web development teacher, thank you very much Sir, great tutorial indeed! :)

  • @joydavis6836
    @joydavis6836 2 роки тому

    Thank you sooo much! Just what I needed.

  • @woodwiseskateboarding6092
    @woodwiseskateboarding6092 5 років тому

    Am learning a lot from this.. So helpful

  • @barborabenova3668
    @barborabenova3668 5 років тому

    I followed the instructions and it worked. Thanks

    • @fataidea135
      @fataidea135 5 років тому

      Did you use xammp or you host it

  • @Nezubñueltomichi
    @Nezubñueltomichi 4 роки тому +1

    awesome, just what I was looking for. Thanks a lot for sharing!

  • @nicktriantafillidis1447
    @nicktriantafillidis1447 4 роки тому +1

    so for those who have the same problem with me (on url shows mailsend but not receiving any mail in your inbox) change your webhost, when i changed it worked perfectly the only thing is that the mails go to spam folder

  • @FutureAIDev2015
    @FutureAIDev2015 5 років тому +1

    This is really helpful! I’m going to try it later to see if I can get it to work on my own server.

  • @fantazero1494
    @fantazero1494 6 років тому

    IT WORKS. Perfectly.

    • @daferbahrar34
      @daferbahrar34 6 років тому

      can you help me ? if ok please send to me message to idafer.dev@gmail.com or chat live in youtube, thanks.

  • @LeonardoGrinn
    @LeonardoGrinn 6 років тому +4

    The easiest tutorial ever !!

    • @DemonIgnis
      @DemonIgnis 6 років тому

      when did he create the index.php file?

  • @hawlhu
    @hawlhu 7 років тому

    期待下個影片的說,馬上按個讚的說

  • @romain3612
    @romain3612 5 років тому

    Tnx sir, I tried many other tutorials , yours is easier and works instantly .

  • @nigelpallatt
    @nigelpallatt 4 роки тому +1

    Thank you very much. Can you do it again but with validation and security in mind? Great Tut!

  • @chauvu5342
    @chauvu5342 6 років тому

    Awesome content!
    I kept thinking I needed to add jQuery to click the submit button.
    So much time saved!
    Thank you!

  • @SaravanaKumar-xw8xt
    @SaravanaKumar-xw8xt 6 років тому

    Thanks you very much. i suffered a lot past 2 weeks at last this tutorial give me a nice result .good keep going and am looking more tut videos ahead .

  • @N3v3r2Lat3
    @N3v3r2Lat3 2 роки тому

    Thx for the wonderful tutorials it was really helpful

  • @vishwaratna4195
    @vishwaratna4195 2 роки тому

    Excellent video tutorial.

  • @stevoe6271
    @stevoe6271 5 років тому +19

    it would be cool to finish off this contact form video by implementing a recaptcha on this contact form :) PS i sent you an email about this :)

  • @daniphordmwajah2840
    @daniphordmwajah2840 5 років тому +1

    I am one of your followers, and really benefiting from your courses. Keep up the good job!

  • @wettermartin
    @wettermartin 6 років тому +3

    Man, you are a number one. I'm strugling with this almost whole week. Thanks a lot

  • @robeeeeen
    @robeeeeen 3 роки тому

    Once again, thanks you!

  • @whitebearddeveloper9038
    @whitebearddeveloper9038 4 роки тому

    You are great man... Thanks for this helpful tut...

  • @neldcneldc3226
    @neldcneldc3226 5 років тому

    Great video, I know understand how to actually make a php form...

  • @التدريبالعلمي
    @التدريبالعلمي 2 роки тому

    Fantastic tutorial bro. thank you so much

  • @DarkLightBoy
    @DarkLightBoy 5 років тому

    Dood your the best it took me 3 days why the email doesn’t send to me and you are the god you deserve 10000000000000000 subs

  • @libertyjoseph8523
    @libertyjoseph8523 6 років тому

    Thanks for the awesome lecture. I have been looking for a simple tutorial like yours. Please, You just nail it. You are a blessing.

  • @cytrobit
    @cytrobit 4 роки тому

    Thanx. Helped me a lot. Good work!

  • @mikeb2604
    @mikeb2604 4 роки тому

    Thank you for this! Very informative and instruction is clear!

  • @marlonM_1985
    @marlonM_1985 3 роки тому

    Love your tutorials man !

  • @toxig1337
    @toxig1337 4 роки тому

    Quality video. It's easy to listen to you explaining stuff and pleasure to look through your coding. I'm definitely coming back to check some more videos. Great job, keep it up

  • @ogbeide-ihamaosagie8851
    @ogbeide-ihamaosagie8851 6 років тому +19

    Hi after adding the code to my website when i click the submit button it just redirects me to contact.php and nothing happens no message is sent

    • @devdeclan
      @devdeclan 4 роки тому +8

      You are probably running it on an apache2 server, this cannot send data to your Gmail address, you have to have a website up with a domain for the data to send. The reason why it's redirecting you to your code on contact.php is that you don't have a domain, you just viewing it on a local file. Sorry if you don't understand, I can't explain properly.

    • @shady7012
      @shady7012 4 роки тому +4

      @@devdeclan actually ive uploaded it on Fast.io but it still opens the php code in a new tab. even tho the site is online

    • @michaelvanin1321
      @michaelvanin1321 4 роки тому

      This happened to me also at first until I realized that the page containing my contact form was not titled 'index.php' but rather something else (index.html in my case). Changed the contact form to reflect this, tested and worked. Thanks Dani for the tutorial.

    • @n0username0n
      @n0username0n 4 роки тому +4

      Hey mate ive been chasing my tail for the past 3 hours on the same issue thinking ive missed a ; or } but no turned out that in my html that i had forgotten to

    • @valleyscharping
      @valleyscharping 4 роки тому +1

      @@n0username0n DUDE, YOU ARE AN ABSOLUTE LEGEND. I'VE BEEN PULLING HAIR OUT TRYING TO FIGURE OUT WHAT I MISSED. Thank you for such a simple fix (it always is something small you missed). I praise God for you, man! Thank you!

  • @dailyone986
    @dailyone986 5 років тому +1

    Best tutorial,
    Thank You!

  • @alaeddinabugrara3309
    @alaeddinabugrara3309 4 роки тому

    As always clear and straight to the point!
    Great lesson thank you so much

  • @petsimk
    @petsimk 6 років тому

    Another really good and easy to follow tutorial.

  • @JescodStudios
    @JescodStudios 4 роки тому

    Thank you so much. It worked out for me!

  • @Rubenjr005
    @Rubenjr005 4 роки тому

    This worked Perfectly. Thank you!

    • @mehak_editz4135
      @mehak_editz4135 3 роки тому

      how ??????? i did same but didnt recieve email

  • @sujonpramanik1151
    @sujonpramanik1151 7 років тому

    Sir Your Tutorial is very good. I learned a lot from you , thanks Man

  • @hamadhabarneh5875
    @hamadhabarneh5875 7 років тому

    Well done course and very clear language and writing.
    Thank you and good luck.

  • @motivationhacks4795
    @motivationhacks4795 4 роки тому +2

    This is exactly I looked for, thanks 😊❤️🙏

  • @isaacodeh8819
    @isaacodeh8819 4 роки тому

    You’ve helped so much

  • @antonismesiris443
    @antonismesiris443 7 років тому

    Is it possible in later videos, to explain how we should make dynamic websites? I ve learned a lot about respnsive static pages but i a bit confused about how to take apart the site to be functional for php editting and accessing it from a simple cms.. thank you again sir!

  • @Idle_dimension
    @Idle_dimension 3 місяці тому +1

    What website hosting platform did you use in this video?

  • @dapesmaster
    @dapesmaster 6 років тому

    Fantastic tutorial. To the point and accurate. Was able to get my own form set up in 30mins :D

  • @codewithwasif3517
    @codewithwasif3517 5 років тому

    Thanks Man! This video helped a lot !

  • @Frankie.Frankie.
    @Frankie.Frankie. 4 роки тому

    ty so much. Exactly what I needed

  • @angelvelazquez1792
    @angelvelazquez1792 4 роки тому +1

    Could I use "42: How to Display Error Messages Using PHP | PHP Tutorial | Learn PHP Programming" along with this tutorial to diaplay error and success messages when someone fills out a contact form?

  • @StocksDictionary
    @StocksDictionary 6 років тому

    Thanks! it works for me.

  • @ankitgupta9155
    @ankitgupta9155 6 років тому +1

    Best place to learn ✓

  • @ElRadioDJ913
    @ElRadioDJ913 7 років тому +3

    The content that you always upload made me feel more confident in programming even though I love film and video games. Keep it up man!

  • @im_dd
    @im_dd 6 років тому

    Thank you very much!
    Easy to follow and works as it should. I will definitely be checking out more of your tutorials.

  • @7thofseventh
    @7thofseventh 5 років тому

    Thank you so much for this tutorial! Helped a lot!

  • @bartmuller100
    @bartmuller100 5 років тому

    Awesome Tutorial! Thank you!

  • @chenx88
    @chenx88 4 роки тому +2

    Where did you get the location from in the
    "header("Location: index.php?mailsend";)"
    section? Do we have to have an index.php for it to work? It seems that that part is causing problems in my code

    • @ishaantek
      @ishaantek 4 роки тому

      I do not know.

    • @imperialrecker7111
      @imperialrecker7111 4 роки тому

      what i found out was that you should do just header("Location: [the webpage that you want to redirect to].html")

  • @slap8704
    @slap8704 7 років тому +1

    AMAZING EASY AND TO THE POINT. Thanks a lot for this tutorial! Got one question tho. is there a way to have a confirmation page or lightbox or an alert kind of thing once the email is sent?

  • @HakaiOver9k
    @HakaiOver9k 3 роки тому

    This is very helpful! I just wanted to ask, as my site is not hosted atm I'm a bit confused about how should I test my funcionality over the code written in php? Do I need a local server or what? Thanks in advance!

  • @hotdogjoe4039
    @hotdogjoe4039 5 років тому

    please tell me the set up that you are using to make this!? what kind of mic are you using? What software are you using to screen record!? Aside from the great short and sweet video about php. The quality of this video is so satisfying to me

    • @Dani_Krossing
      @Dani_Krossing  5 років тому +1

      I think I was using the Audio Technica AT2020 at this point when recording (+ a lot of post sound editing). And then I used Bandicam to record the screen.

  • @mamoonh
    @mamoonh 6 років тому +3

    thanks alot really helped me

  • @nuraini-yd6sy
    @nuraini-yd6sy Рік тому

    Love this , thanks

  • @enggaabow3801
    @enggaabow3801 3 роки тому

    Thank you sir🙏

  • @stellame7842
    @stellame7842 6 років тому

    I'd kiss you if I could. Thank you so much. Worked perfectly 1st time. Have only worked in HTML, so to be able to do a php file and have it work 1st time is awesome.

  • @danielambriz881
    @danielambriz881 Рік тому

    I love this video! Do you have one in which you use the htmlspecialchars function in a form such as this one?

    • @Dani_Krossing
      @Dani_Krossing  Рік тому +1

      Hmmm don't think so... but you should add it after every form submission, even though I didn't in the video 🙂
      So for example instead of:
      $message = $_POST["message"];
      You write:
      $message = htmlspecialchars($_POST["message"], ENT_QUOTES, 'UTF-8');

    • @danielambriz881
      @danielambriz881 Рік тому

      @@Dani_Krossing Thank you much and happy new year:)))

  • @nekel1990
    @nekel1990 6 років тому

  • @iajoe9077
    @iajoe9077 8 місяців тому

    Thanks sir! 🙏
    How do i need to do to use local/offline server for testing my contact form?🙏

  • @loscolaro2725
    @loscolaro2725 5 років тому +1

    Best explanation so far but didn't work on my website I need help :-(