Create A Contact Form with PHP That Can Actually Send Mails!

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 พ.ย. 2024

ความคิดเห็น • 132

  • @RobertVeale
    @RobertVeale 3 หลายเดือนก่อน

    I too have been fighting to find a way to send mail through my site. It's been hours of searching over many days but now that search is over. Your video was great and got me finally up and running. THANK YOU!!

  • @awaznipi2709
    @awaznipi2709 ปีที่แล้ว +1

    No Server config, SMTP ect, No phpmail and it's just this simple?. i cant believe i had spend days trying to configure phpmail, to no avail. thanks a million.

  • @2fpchuck
    @2fpchuck 2 ปีที่แล้ว +11

    Concepts, code, and execution were easy thanks to this tutorial! YOU ARE THE BEST MAN!

    • @cptobv
      @cptobv ปีที่แล้ว +1

      Indian accent

  • @pureart94
    @pureart94 ปีที่แล้ว +2

    Thanks for your Help!! I have seen so many Videos that couldnt help me out. But your way works fine and simple! THX!!!

  • @dpcare1499
    @dpcare1499 8 หลายเดือนก่อน +2

    Excellent tutorial with speak is fine. Thanks from bottom of my heart.

  • @beatriz1598
    @beatriz1598 2 ปีที่แล้ว +2

    not every hero wears cape THANK YOU

  • @frodion
    @frodion 5 หลายเดือนก่อน

    Best tutorial for this topic. Thank you very much!

  • @php-frankgp
    @php-frankgp ปีที่แล้ว +1

    excellent tutorial, it helped me to make my first contact form ✌

  • @toma1610
    @toma1610 2 ปีที่แล้ว +2

    About inserting more inputs. I am developing a Thank You page like yours, but adding an ARRAY. For example:
    “Thank You, $name for contacting us. We will write you back to $email. Your selected options are: $array_with_selected_or_checked_options.
    I would like that array to be showed separated by comas. I checked something about the IMPLODE function, but how do I do to pack the array with the selected options in one variable and insert it everywhere? Are you in Stackoverflow?

  • @KeffelewAssefa
    @KeffelewAssefa 2 ปีที่แล้ว +4

    Thank you, what type of setting do you use for your VS code?

  • @yazilimci_adam
    @yazilimci_adam ปีที่แล้ว +2

    A clean and cool tutorial !

  • @tomar666
    @tomar666 2 ปีที่แล้ว +3

    That's exactly what I was looking for!!! Thank you so much!! Awesom stuff. Super simple :)

  • @hassanabu2750
    @hassanabu2750 2 ปีที่แล้ว +6

    This is a really good tutorial, thank you. I am having a problem though. I get an error every time I try sending my form. Can you help please?

    • @php-frankgp
      @php-frankgp ปีที่แล้ว

      in the mailheader you have to put the email of your web domain

  • @myllerolivio9699
    @myllerolivio9699 2 ปีที่แล้ว +4

    Very good video and explation. Now, if I have an existing website with many folders in my root directory, where or which folder do I upload my files to? Can you shed some light? Thanks

    • @MrCoderYt
      @MrCoderYt  2 ปีที่แล้ว +1

      It doesn't matter. Just make sure that the path of the file is right.

  • @erikdinos1229
    @erikdinos1229 2 ปีที่แล้ว +1

    thank you for this tutorial! worked like charm!

  • @skisenvient
    @skisenvient ปีที่แล้ว +1

    Great tutorial. Thank you!

  • @kalinsexplores5883
    @kalinsexplores5883 ปีที่แล้ว +1

    Thanks buddy! I've done it!

  • @kelxdlol
    @kelxdlol 2 ปีที่แล้ว +1

    Thank you so much!!! It is working all good on my website!!!!!!

  • @diogofrazao4919
    @diogofrazao4919 ปีที่แล้ว +1

    thanks man you helped me a lot. You're a chad

  • @wie.funktioniert
    @wie.funktioniert 8 หลายเดือนก่อน

    Please show at the beginning what the end product will be so we know if it is the right thing for us.

  • @esasrl3384
    @esasrl3384 ปีที่แล้ว

    Great tutorial! One of the best on the subject. Can i please ask you, if i want to have a modal (popup) message once the email is sent how do i link the script? Instead of how you did with another thank you page with a return to homepage link? Thank you for your answer.

  • @Miles09
    @Miles09 2 ปีที่แล้ว +1

    Very informative video. Thanks for the content.

  • @smjanet
    @smjanet 2 ปีที่แล้ว +2

    Thanks for the video.
    Pls do I need to upload my project to live server for this code to work? Or can it work locally using xamp server ?

  • @albedesigns
    @albedesigns 5 หลายเดือนก่อน

    Thanks for the video.. I'm such a noob when it comes to back end lol the font in your IDE is a bit hard to read for me though.

  • @chome4
    @chome4 2 ปีที่แล้ว

    Works well. How can I add a list of checkboxes so the email contians a list of items I check?

  • @ÂngelaGarcia-y2y
    @ÂngelaGarcia-y2y หลายเดือนก่อน

    Hi, i did all like u did but show me error can u help me, this just work if i public?

  • @toma1610
    @toma1610 2 ปีที่แล้ว +1

    Here, you didn‘t use isset function. It was not necessary. So, when should we use it?
    if isset $_POST [ ' submit ' ]; etecetera...

    • @php-frankgp
      @php-frankgp ปีที่แล้ว

      The isset function is used to check if it is null or not.

  • @jcoff1000
    @jcoff1000 2 ปีที่แล้ว

    Love the help and video. I was trying to add more fields and I cant get it to work. I need 3 more fields and 2 need to be check boxes.

  • @wolfenrico
    @wolfenrico ปีที่แล้ว +1

    Thank you for your Tut. It is great! I'd like to add some more input fields, like fon number or date in the form. How can I change the php file to send this information with the email. I'd try to do this (mail($recipient, $tel, $subject, $terminwunsch, $message, $mailheader) or die("Error!");), but it does not work. Can you help me?

    • @skonfoot4066
      @skonfoot4066 9 หลายเดือนก่อน

      me too , find you a solution ?

    • @wolfenrico
      @wolfenrico 9 หลายเดือนก่อน

      No!@@skonfoot4066

  • @lokesh31286
    @lokesh31286 ปีที่แล้ว

    Can you please provide the video for attaching a file to mail with same contact form

  • @silviudragan8511
    @silviudragan8511 2 ปีที่แล้ว

    is very useful vide,works on mobile and pc. But if the one who fills in the form enters a yahoo mail address no longer receive his answer on gmail . The form works only if he introuduces a gmail address. Can you help us?

  • @shushurel
    @shushurel ปีที่แล้ว +1

    It's working but didn't receive any email on the receiver(email inbox or spam)

    • @mingming4186
      @mingming4186 4 หลายเดือนก่อน

      I have the same problem here as well. Wonder why it's not working.

  • @DetectiveSquarepants
    @DetectiveSquarepants ปีที่แล้ว

    I get a 405 error even after using the same code and steps. Any thoughts?

  • @aauniversal4122
    @aauniversal4122 11 หลายเดือนก่อน

    i have a website through which i send a mail to the user. the email address through which i am sending the email i want to change this email

  • @MohamedArafathCanada
    @MohamedArafathCanada 7 หลายเดือนก่อน

    Sir can you do a video how to send mail using only xampp with Gmail smtp

  • @erikdinos1229
    @erikdinos1229 2 ปีที่แล้ว +1

    hello all...is there any way, to add one more field? i want to get the sender's phone number too,in the emails that i receive? tried some things, but no luck!

    • @php-frankgp
      @php-frankgp ปีที่แล้ว

      Could you add one more field?

  • @salaheddine9251
    @salaheddine9251 2 ปีที่แล้ว +1

    Hi, after I click the “send” button it leads me to a page with only the php code and not the html.index

    • @salaheddine9251
      @salaheddine9251 2 ปีที่แล้ว

      Or does it only work when the website is online

    • @YemeniTechnician
      @YemeniTechnician 2 ปีที่แล้ว

      Me too, I am online and when I click Send it leads me to php code

    • @salaheddine9251
      @salaheddine9251 2 ปีที่แล้ว +1

      @@YemeniTechnician I think I figured it out, php only works when it’s online

  • @kalilfagundes7431
    @kalilfagundes7431 8 หลายเดือนก่อน +1

    Thanks!

  • @malcflodailyinspiration4379
    @malcflodailyinspiration4379 2 ปีที่แล้ว

    Thanks, it worked fine!👍🙂

  • @raqueliatheimpatientgardne8196
    @raqueliatheimpatientgardne8196 2 ปีที่แล้ว

    Oh never mind I figured it out. Gmail will not allow it for some reason and in protonmail it is going into the SPAM folder! Why? I don't have the slightest idea, thoughts?

  • @dr.surendrashah
    @dr.surendrashah 2 ปีที่แล้ว

    I make three files and copy paste all codes of yours and change email address to mine in PHP file, uploaded. However when I check and fill the form and sent. it shows sent confirmation message. However email was not received in inbox or junk folder. Do I need to make some setting in cpanel setting?

    • @sneakycheeky531
      @sneakycheeky531 ปีที่แล้ว

      u fix it ?

    • @php-frankgp
      @php-frankgp ปีที่แล้ว

      en el mailheader tiene que poner el email de tu dominio web, in cpanel no

  • @musiqbanktv7001
    @musiqbanktv7001 ปีที่แล้ว +1

    ❤thank u boss

  • @lorenzociniglio3591
    @lorenzociniglio3591 2 ปีที่แล้ว

    Works for me. Except sometimes emails wind up in my junk mail folder

  • @reallifepubg00039nav
    @reallifepubg00039nav ปีที่แล้ว

    Bro osm🎉

  • @IslamAudioStation
    @IslamAudioStation 2 ปีที่แล้ว

    great tutorial sir, for some reason the email lands in the junk folder unfortunately. still thank you very much.

  • @djonsmith4345
    @djonsmith4345 ปีที่แล้ว

    Thank you for the tutorial but it is not working. It is giving die Error! message. I uploaded the same github code into server. Please check.
    Thanks in advance

    • @php-frankgp
      @php-frankgp ปีที่แล้ว

      in the mailheader you have to put the email of your web domain

  • @DeepSingh-of7dl
    @DeepSingh-of7dl 11 หลายเดือนก่อน

    how can i upload in xampp server?

  • @alltypevideobyakash1572
    @alltypevideobyakash1572 3 ปีที่แล้ว

    It's also work mobile device? because some php use conract from work pc but not work mobile device . plz tell me plz please

    • @MrCoderYt
      @MrCoderYt  3 ปีที่แล้ว +1

      Yes. It works perfectly fine. I have checked with mobile devices also.

  • @jamescarltamayo943
    @jamescarltamayo943 2 ปีที่แล้ว

    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:\xampp\htdocs\phpchurch\send-message.php on line 22
    Error!
    How to fix this? :(

    • @vedamanichilukuri1399
      @vedamanichilukuri1399 2 ปีที่แล้ว

      HEY even i too got same error.. have u resolved it?

    • @tintin8186
      @tintin8186 2 ปีที่แล้ว

      same problem I encounter

    • @teamtmc7384
      @teamtmc7384 2 ปีที่แล้ว

      @@tintin8186 u have to upload it

    • @paulapeter1846
      @paulapeter1846 2 ปีที่แล้ว

      I have the same problem 😕

    • @teamtmc7384
      @teamtmc7384 ปีที่แล้ว

      @@PDP777PT i mean you have to host it , offline by xampp or pay it

  • @saifghanmi9322
    @saifghanmi9322 2 ปีที่แล้ว +1

    THANKSSS

  • @PoshYoshii62
    @PoshYoshii62 2 ปีที่แล้ว +1

    why is this downloading the php file on submission

    • @php-frankgp
      @php-frankgp ปีที่แล้ว

      this usually happens when you don't have a php server

  • @helaolange
    @helaolange 2 ปีที่แล้ว

    Which server are you using

  • @oytunilgar715
    @oytunilgar715 2 ปีที่แล้ว

    When i write $mailheader="From" . $name "

    • @bbyfeather
      @bbyfeather ปีที่แล้ว

      Think you are missing a dot between $name and "

  • @raqueliatheimpatientgardne8196
    @raqueliatheimpatientgardne8196 2 ปีที่แล้ว +1

    Hi there,
    I am having an issue with something that I cannot figure out. I have used all your code but am working with a one page website that has the contact form at the bottom of the index.html. After putting it all together and filling out the contact form from my site it does say that the message was sent but I never get the messages. I think it might have something to do with Hostgator and where the file is located and was wondering if you could direct me to the correct place to upload my files? I have sub domains under my main domain as I have the baby package and do I need to put these files in the zip folder into the public_html folder and then extract them there? If so then how will the sub domain of my website access these files? or is it because I am using a one page website? It's very confusing on Hostgators end because they cannot help me, I have tried to call them twice and both times they hung up on me. I had even tried to forward my email from Hostgator but that didn't work either. I have gmail and protonmail and neither email gets the message so it has to be something on the server side.
    Please help:>}

    • @joy-ov7nj
      @joy-ov7nj 2 ปีที่แล้ว +1

      If you're hosting your site on vs code using the live server extension the POST method does not work. Once you upload your site to a web host provider such as godaddy and they allow emails to be sent through their service it works perfectly

  • @anton3997
    @anton3997 2 ปีที่แล้ว +1

    Thankyou 10000000000000000000000❤️

  • @techwithgimhan1743
    @techwithgimhan1743 2 ปีที่แล้ว +1

    thanks

  • @sureshmane233
    @sureshmane233 ปีที่แล้ว

    i want contact form with file upload to email

  • @d1hoops975
    @d1hoops975 3 ปีที่แล้ว

    will it work with next js?

  • @thoufeequeahmed.j3659
    @thoufeequeahmed.j3659 2 ปีที่แล้ว +1

    i get error 405 method not allowed how to fix

    • @joy-ov7nj
      @joy-ov7nj 2 ปีที่แล้ว +1

      If you're hosting your site on vs code using the live server extension the POST method does not work. Once you upload your site to a web host provider such as godaddy and they allow emails to be sent through their service it works perfectly

  • @terojsevi8090
    @terojsevi8090 ปีที่แล้ว +1

    Warning: Failed to connect the mail server, verfy SMTP

  • @krishnasingh-ek1ix
    @krishnasingh-ek1ix 2 ปีที่แล้ว

    thank a lot brother

  • @NisanthErakkatt
    @NisanthErakkatt ปีที่แล้ว

    Not working in hostgator hosting

  • @bkentertainment6402
    @bkentertainment6402 ปีที่แล้ว

    I did everything you did. I uploaded it to my own server, but I did not receive any mail in my mailbox. (I know it will come to your spam box)

    • @php-frankgp
      @php-frankgp ปีที่แล้ว

      in the mailheader you have to put the email of your web domain

    • @bkentertainment6402
      @bkentertainment6402 ปีที่แล้ว

      @@php-frankgp I tried both but it didn't work. Do you have a pre-made code file that you can share with me?

  • @gchatterjee7012
    @gchatterjee7012 2 ปีที่แล้ว

    Html form action php code not sending form details to mail inbox. Your immediate response is highly appreciated. infinity free host.

  • @muhammadjunaidraza2246
    @muhammadjunaidraza2246 2 ปีที่แล้ว

    hey Email is sending but data not receive

    • @muhammadjunaidraza2246
      @muhammadjunaidraza2246 2 ปีที่แล้ว

      can you help me

    • @MrCoderYt
      @MrCoderYt  2 ปีที่แล้ว

      @@muhammadjunaidraza2246 Please download the source code from the github repo. The link is in the description. Then at mail.php change the recipient email address to your email address. You will receive the email. If you cant see it in the main inbox, check your spam folder.

  • @velrajavelraja7663
    @velrajavelraja7663 2 ปีที่แล้ว +1

    showing error

  • @hybrid_twinx
    @hybrid_twinx 2 ปีที่แล้ว

    Hi, I don't receive any email..

    • @MrCoderYt
      @MrCoderYt  2 ปีที่แล้ว

      Check your spam folder please.

  • @kaweeshaavindu1409
    @kaweeshaavindu1409 ปีที่แล้ว

    how to create account in cpanel

  • @photon_effect4341
    @photon_effect4341 ปีที่แล้ว

    hey your code didn't your it is throwing out this error:
    Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in C:\xampp\htdocs\my document\contact.php on line 11
    Error

  • @umangpathakp
    @umangpathakp 2 ปีที่แล้ว

    i am getting 405 erro after clicking send

  • @dosisinternetharian
    @dosisinternetharian 2 ปีที่แล้ว

    i cant use cpanel, how to do that?

  • @haigoto46
    @haigoto46 2 ปีที่แล้ว

    Hi, How to add CAPTCHA?

    • @MrCoderYt
      @MrCoderYt  2 ปีที่แล้ว +1

      Hopefully this will help: www.w3school.info/2016/07/28/create-own-captcha-for-your-website/
      I will create a video on that in future.

  • @thegoat2936
    @thegoat2936 2 ปีที่แล้ว

    How to install cpanel ??

  • @abbaswebguru3352
    @abbaswebguru3352 2 ปีที่แล้ว

    spam solution?

  • @awaznipi2709
    @awaznipi2709 ปีที่แล้ว

    Attachment 📎 please 😢

  • @rrrrrrr202
    @rrrrrrr202 ปีที่แล้ว

    Hi is it safe? from hacking? Thanks alot

  • @massphers
    @massphers 2 ปีที่แล้ว

    02:21 Ass son😂😂😂

  • @MiraculousLadybugPhilippines
    @MiraculousLadybugPhilippines 2 ปีที่แล้ว

    not receiving a email

    • @joy-ov7nj
      @joy-ov7nj 2 ปีที่แล้ว

      If you're hosting your site on vs code using the live server extension the POST method does not work. Once you upload your site to a web host provider such as godaddy and they allow emails to be sent through their service it works perfectly

  • @azamwahid
    @azamwahid 2 ปีที่แล้ว

    where to add password ?

  • @ElEcodelTren
    @ElEcodelTren ปีที่แล้ว +1

    all of this is useless if it doesn't have a mail validation code

    • @onwuekwemiracle6906
      @onwuekwemiracle6906 9 หลายเดือนก่อน

      How?

    • @ElEcodelTren
      @ElEcodelTren 9 หลายเดือนก่อน

      @@onwuekwemiracle6906 i dont remember exactly why i was needing it for... but i think certain plugins or certains thins like google ad sense or i dont remember which one asks you some layers of security as the validations of the sender email, if it doesnt have it your site could be easly massively spammed with trash mails

  • @shyamsundersingh9115
    @shyamsundersingh9115 3 ปีที่แล้ว +1

    Its not working on server

    • @oscarmartinlive
      @oscarmartinlive 3 ปีที่แล้ว +1

      I get an Error

    • @joy-ov7nj
      @joy-ov7nj 2 ปีที่แล้ว

      If you're hosting your site on vs code using the live server extension the POST method does not work. Once you upload your site to a web host provider such as godaddy and they allow emails to be sent through their service it works perfectly

  • @ohid2010
    @ohid2010 ปีที่แล้ว

    it's not working

    • @php-frankgp
      @php-frankgp ปีที่แล้ว

      works correctly!

    • @ohid2010
      @ohid2010 ปีที่แล้ว +1

      I downloaded the code from git and hosted it on my live server but it did not work. can you provide me your live server link and source code that working properly?

    • @php-frankgp
      @php-frankgp ปีที่แล้ว

      @@ohid2010 you have to change the sender, it is the fourth parameter, I have a tutorial that you can see to understand it better th-cam.com/video/IO9vSm-a918/w-d-xo.html

  • @sneakycheeky531
    @sneakycheeky531 ปีที่แล้ว

    only sends like once

    • @php-frankgp
      @php-frankgp ปีที่แล้ว

      you can duplicate the function or create a loop

    • @sneakycheeky531
      @sneakycheeky531 ปีที่แล้ว

      THNKS but i resolved it

    • @Indra0T
      @Indra0T 9 หลายเดือนก่อน

      @@sneakycheeky531how you did it please?

  • @valzu3921
    @valzu3921 ปีที่แล้ว +1

    This is worthless because mail goes to spam folder

    • @php-frankgp
      @php-frankgp ปีที่แล้ว

      you have to validate your domain so that it does not reach spam

    • @onwuekwemiracle6906
      @onwuekwemiracle6906 9 หลายเดือนก่อน

      ​@@php-frankgp how?

  • @akuarifin
    @akuarifin 2 ปีที่แล้ว

    not working in email googlesuite/googleworkspace :( help me brother