PHP Save Form Data into Database and Send Email to Admin using GMAIL SMTP | With AJAX

Поделиться
HTML-код
  • Опубликовано: 22 апр 2020
  • Hello everyone! Welcome to my PHP Save Form Data into Database and Send Email to Admin using GMAIL SMTP video. In this video, I have show you how you can save any form data into a database with and without ajax. After save data we will send form data to the admin email id.
    Learn PHP Online with Me:- bit.ly/LearnPHPOnline
    To help and support me(Donate Me):- bit.ly/DonateProgrammingWithV...
    Download Source Code:- bit.ly/phpGmailSMTP
    #PHP #SMTP #PHPSMTP
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ✅Subscribe: / @programmingwithvishal
    I am a Digital Marketer by passion and a Developer by profession. With experience and expertise spanning around 10 years, in the Digital space.
    Good amount of experience in development of web applications using PHP, .Net, JavaScript Library’s, Frameworks, CMS, API’s, Reporting tools and Payment Gateways. Skilled in digital viral marketing, technology innovation's, brand building and all phases of the Web development lifecycle with an expert in translating business requirements into technical solutions and fanatical about quality, usability, security, and scalability. Dealing with and resolving problems and issues which arise.

Комментарии • 263

  • @ProgrammingwithVishal
    @ProgrammingwithVishal  4 года назад +15

    14:24 line 17 is $mail->Port instead of $mail->Post

    • @ramaaryan9849
      @ramaaryan9849 3 года назад

      really a good video to see on backend thankyou so much

    • @harshsharma3975
      @harshsharma3975 3 года назад +1

      Jab me hosting kar raha hu toh error aa raha hai -- Illegal string offset 'SMTP connect() failed.
      ?????
      Localhost me code run ho raha hai but jab me host kar hu toh error aa raha hai??

    • @akashsrivastava947
      @akashsrivastava947 3 года назад

      Call to undefined method PHPMailer setfrom me aarha ???

    • @abdulaziz7013
      @abdulaziz7013 3 года назад +1

      @@ramaaryan9849 hats off sir.. Very helpfull

    • @mumbaibhaijaan
      @mumbaibhaijaan 3 года назад

      Sir submit karne par error aa raha h
      Uncaught phpmailerException: you must provide at least one recepient email address. In c\xampp\htdocs\phpgmail\smtp\class.phpmailer.php: 1243 stack trace #0
      c\xampp\htdocs\phpgmail\smtp\class.phpmailer.php(1212) : PHPMailer->presend()#1
      c\xampp\htdocs\phpgmail\index.php(33) : PHPMailer->send()
      Karke solution kya h sir

  • @nripendrasingh9327
    @nripendrasingh9327 3 года назад

    Ap ka har video bahut hi acha h or samjha mai sab kuch aa jata .Thanks

  • @sammykumar7463
    @sammykumar7463 3 года назад

    Thank You very much sir, I've tried many other videos and codes but they didn't explained and coded very well. I found your link and place the code as per your instructions. I've finally succeeded for my website contact us page. Thanks you again for help. :)

  • @MuhammadAbbas-uq4bt
    @MuhammadAbbas-uq4bt 2 года назад

    Thank you Vishal, this video is great to learn how to create a contact us form.

  • @forexspectrum4799
    @forexspectrum4799 2 года назад

    sir thank you so much
    your voice is so sweet
    I really appreciate your teaching way

  • @ashishgujjr903
    @ashishgujjr903 4 года назад +3

    As always thank you so much Sir for the step by step clear information. Apke video ka sabse acha point ye lagta hai ki aap step by step process dikhate ho.

  • @dr.sanjaypatil8724
    @dr.sanjaypatil8724 4 года назад +1

    गुप्ता सर जी आपका PHP का ज्ञान सचमूच अप्रतिम है आपको लाख लाख धन्यवाद

    • @ProgrammingwithVishal
      @ProgrammingwithVishal  4 года назад +1

      संजय जी आपका बहुत धन्यवाद, इतने सुन्दर शब्द लिखने के लिये.

  • @vickyyagami
    @vickyyagami 2 года назад

    Vishal bhai Zarardast. thank you for your tutorial

  • @newmoviesworldtv1405
    @newmoviesworldtv1405 Год назад

    Vishal bhai i am from pakistan,your video is very very great full realy so nice

  • @bishwashsubba15
    @bishwashsubba15 3 года назад

    thank you sir ji SMTP ki ye lesson ke liye

  • @syedraghib8279
    @syedraghib8279 3 года назад

    thank you so much sir
    very helpful god bless you sir

  • @info-Travels
    @info-Travels 4 года назад +8

    i am from Pakistan ! i really appreciate your efforts for teaching us in such a detailed and explanatory way ! Thankyou

  • @sumitnagpal2794
    @sumitnagpal2794 4 года назад +1

    Thanks alot sir !
    You taught very well and the video is really benificial for me .

  • @shafinatiq3507
    @shafinatiq3507 3 года назад

    Loved this tutorial,

  • @ashishprajapati1922
    @ashishprajapati1922 4 года назад +1

    Sir mind blowing all tutorial. Me aapka fan ho gaya

  • @100rabhsrivastava2
    @100rabhsrivastava2 4 года назад +1

    nice video on PHP contact form clearly explained all the concepts used in this .....

  • @mr.shoaibmalik2488
    @mr.shoaibmalik2488 3 года назад

    wonderful explinations sir

  • @devanshmadd
    @devanshmadd 3 года назад

    Thanks bhai! aapne kaafi help ki. :)))

  • @09AKHLESH
    @09AKHLESH 3 года назад

    thanks so much sir its working 100%..............wowwwwwwwwwwww kya bat.........very good

  • @entertainmentkiduniya3878
    @entertainmentkiduniya3878 3 года назад

    Really you are doing great job Vishal ji.
    I have implemented this. its really saved my time... Thanks

  • @pinakiwb
    @pinakiwb 3 года назад +1

    Sir, you have done a great work!❤️👍

  • @geethavadupu1760
    @geethavadupu1760 3 года назад

    thanku sir, its workng on localhost as well as server.

  • @Rocky-sm5jp
    @Rocky-sm5jp 4 года назад +1

    Bohot barhia.. keep it up. we always with you.

  • @mobinsheikh1363
    @mobinsheikh1363 3 года назад

    Good explain in video thanks alot sir

  • @ANKITKUMAR-pi2ng
    @ANKITKUMAR-pi2ng 2 года назад

    Great work sir

  • @rivagupta5449
    @rivagupta5449 4 года назад +2

    Thank you Sir. Aap hamesha HTML ki bani hue template use karte hain, usse mujhe bahut help mili Sir. Jab maine company main job start ki toh maine template pe code bahut easy se kar payi. Pahle mujhe lagta hai ki aap galat karte ho html bhi khud banana chaiye per ab samaj aaya company main join karke ki yaha toh bani hue template pe kaam karna hota hai. Thanks a lot Sir for wonderful video

    • @ProgrammingwithVishal
      @ProgrammingwithVishal  4 года назад

      Thanks a lot Riva for your kind words and support

    • @sebastiansultz7367
      @sebastiansultz7367 4 года назад

      aur me ye soch kr templates pe kaam ni krta tha ki shayad ye galat tarika hota hae par still me asani se template pe kam kr leta hun par man me yahi thinking hoti thi ki shayad ye galat ho par this comment make me fareless
      thanks RIva

  • @MohitKumar-jg4ry
    @MohitKumar-jg4ry Год назад

    thank you sir🤗

  • @SureshKumar-qx6vh
    @SureshKumar-qx6vh 3 года назад +1

    You are an excellent knowledge in php

  • @karankka1484
    @karankka1484 Год назад

    finally after full day of trying different videos your method worked so easily love it thanks sir
    edit: i want to sent the carbon copy of the form to the sender how can i do that? please provide the code thanks.

  • @anjalikesarwani4970
    @anjalikesarwani4970 3 года назад

    Thank you so much 🙏🙏

  • @Er.jaisingh
    @Er.jaisingh 3 года назад

    Really you are doing great job Vishal Sir,
    Sir, Now php 8 released Please create a video on this topic.

  • @diptimayeesahoo2674
    @diptimayeesahoo2674 3 года назад +1

    Thanks a lot for explained in details

  • @mrsid5212
    @mrsid5212 2 года назад

    Thanks bhaiya

  • @Neha-Neha
    @Neha-Neha 4 года назад +2

    Very useful video.As always!!

  • @pawan-meena
    @pawan-meena 3 года назад

    Thanks

  • @MaheshPatil-iy5ko
    @MaheshPatil-iy5ko 4 года назад

    Always thanks sir garments shop project

    • @ProgrammingwithVishal
      @ProgrammingwithVishal  4 года назад

      Thanks Mahesh.
      E-Com website maine already banayi hai, garments shop wali bhi waise hee hogi.

  • @alltype4429
    @alltype4429 3 года назад +1

    sir very help full video , thank you sir

    • @ProgrammingwithVishal
      @ProgrammingwithVishal  3 года назад +1

      Most welcome

    • @alltype4429
      @alltype4429 3 года назад

      @@ProgrammingwithVishal SIR KAYA ASA HOGA, KOI AGAR INDIA K BAHAR, MERA WEBSITE VISIT KORE TO, USSNE JAHA SE VISIT KIAYA HEY FIRST USS KO USSI COUNTRY KI PRODUCT PEHELE DEKHAI DE...

  • @pankajsharma170
    @pankajsharma170 4 года назад +1

    sir video m etna interest ban jata hai ki jab ap like krne k liye bolte ho to video pause krne k mn hi nhi krta bss dakho dakho or dakho thanku sir

  • @abhishekdutt1019
    @abhishekdutt1019 3 года назад +1

    Vishal sir ur awsome :)

  • @siddiqsiddiq236
    @siddiqsiddiq236 3 года назад +1

    thanks

  • @farhanmehsood
    @farhanmehsood 3 года назад +1

    Thanks sir

  • @avikkhadka7923
    @avikkhadka7923 4 года назад

    Great One.Please explain about use of elastic search in ecommerce using php.

  • @akshaychougule7170
    @akshaychougule7170 4 года назад

    thank you sir .........nice......... please make tutorials on bootstrap ........

  • @EricAstarcom
    @EricAstarcom 4 года назад +1

    Thank you sir for your video , please any tutorial on whatsapp using php and mysql. thanks for wonderful tutorial

    • @ProgrammingwithVishal
      @ProgrammingwithVishal  4 года назад

      Thanks Eric. Here are whatsapp video ruclips.net/video/L5w7GuXTI50/видео.html

  • @ajaynautiyal1345
    @ajaynautiyal1345 4 года назад +1

    Sir , you have done great work.
    I request you to please develop mini online exam portal in Core php with security and with all functionalities of student and teacher .like as create exam asd ques , set date and time,timer, one que at a time and save result in database to teacher. Pls Sir . thank you.

  • @dastgirakhtar9782
    @dastgirakhtar9782 4 года назад +1

    Great

  • @mansiyadav4467
    @mansiyadav4467 3 года назад

    Thank u sir.. It's very useful.. Kya hum simple php ka mail function use krke mail send nhi kr sktye h??

  • @nahedakhan6837
    @nahedakhan6837 3 года назад

    please countinue that ajax series .

  • @harshrajput9232
    @harshrajput9232 3 года назад

    Thanks sir ji,😍
    Smpt k folder m Jo file usme SE PHP mailer autoload ki chhod k sb ko hata skte hai kya

  • @braos5130
    @braos5130 2 года назад +3

    Brother... your video is so clear..just one doubt..
    @13.19 you have included a Smptp file
    Wher can I get that ? Pls advise

  • @ashishprajapati1922
    @ashishprajapati1922 4 года назад +1

    👌👌👌👌👌🤗🤗

  • @avinashvk578
    @avinashvk578 4 года назад

    Thanks alot Sir. can u also make a video on how to send confirmation mail to user after submitting the form please

    • @ProgrammingwithVishal
      @ProgrammingwithVishal  4 года назад +1

      Welcome.
      By same way. Just change admin email id to user email id

    • @avinashvk578
      @avinashvk578 4 года назад

      @@ProgrammingwithVishal thanks alot sir.many youtubers don't reply, i thought the same, but u replied me 🥰😍

  • @irinukaification
    @irinukaification 2 года назад

    it's your super tutorial. I want to implement it in a codeigniter framework web page. It is saved in the database but no longer sends the email. How can I solve this

  • @bigramgurung1330
    @bigramgurung1330 3 года назад

    hello sir, it works well in localhost, but when i put in liver server it keeps processing, but i get date in db but no notification in mail.

  • @motivationandjoy3916
    @motivationandjoy3916 3 года назад

    Here when gmail setting are changing then received message 'Access for less secure apps settings' why this type msg give by Google. What SMTP is not secure??

  • @yashchintawar6084
    @yashchintawar6084 2 года назад

    can we do it in a way if someone submitted data an d we just sending data to them without database

  • @yashrajghosalkar5582
    @yashrajghosalkar5582 3 года назад

    Please Help me sir , With the help of your tutorial I am making my project "Handicap Store". but I have encountered one problem. everything works well. otp is also send to dedicated email but send otp button converts to please wait and then enter otp field dont appears.

  • @user-pq3hf6mm1l
    @user-pq3hf6mm1l Год назад

    Gmail feature of "Less secure " not supporting by google...Do we have any alternative ?

  • @portnu
    @portnu 2 года назад

    If I want to add my business account Id instead of original gmail Id in from address what need to change?

  • @RajeshKumar-xt7hl
    @RajeshKumar-xt7hl 3 года назад

    Very knowledgeable video
    I have 1 question: If we have to sent mail on domain email address then how we can sent.?

    • @ProgrammingwithVishal
      @ProgrammingwithVishal  3 года назад +1

      Same way, use that domain smtp details.

    • @RajeshKumar-xt7hl
      @RajeshKumar-xt7hl 3 года назад

      Sir I try you code in localhost it work very well
      But when I try it on live server it save data in database but didn't send mail. Will u help

  • @railindiasims
    @railindiasims 7 месяцев назад

    Sir there have any way to check email is valid or not in contact form? Urgent

  • @amanchaurasiya6238
    @amanchaurasiya6238 3 года назад

    Sir jese aapne gmail smtp usekiya h usse esa lgta h k ye free and easy to use h to sendgrid ko prefer kyu krte h sb ?

  • @muhammadadil-te8gf
    @muhammadadil-te8gf 3 года назад

    Thanks for making this great video.But how to send the multiple emails. For multiple emails this is not working on my side. The email I just add is only sent

    • @ProgrammingwithVishal
      @ProgrammingwithVishal  3 года назад

      Welcome.
      Repet the same function, just one change, remove phpmailer library from function to file top.

  • @navnitkhandait6170
    @navnitkhandait6170 2 года назад

    When did you create database named RUclips

  • @sanjaykumardpatel8749
    @sanjaykumardpatel8749 3 года назад +1

    Uncaught exception phpmailerException with message Extension missing openssl'in error bata raja hai

  • @khemchand6853
    @khemchand6853 4 года назад

    sir ya localhost par kaam kerage?

  • @Abhishekyadav-mo6py
    @Abhishekyadav-mo6py 3 года назад

    j query is not working saying jquery funciton is not defined
    i have used other links as well but no sucess could you please help me my project got stuck because of this

  • @sarahhani2002
    @sarahhani2002 Год назад

    can i send email with attachement too?

  • @dhanashridaud9425
    @dhanashridaud9425 3 года назад

    i want to send mail by office 365 account mail id or hostinger id ?

  • @paramamandal4817
    @paramamandal4817 2 года назад

    Dear sir me chahatahun ki mera mail pe jo data aaye us data ko me mera sql database pe rakhu , ho sakta he kyaa?

  • @mohammadnazmi6592
    @mohammadnazmi6592 Год назад

    mujhe 1 pic, ya doc file bhi sath me bhejna h mail me ... ya 1 link sath me bhejna h to kese jayegi... plz btye

  • @explorewithme131
    @explorewithme131 3 года назад

    Hi sir, how to send email to 1 lacs users. Which is the best solution?

  • @AshishKumar-zt5pt
    @AshishKumar-zt5pt 3 года назад +1

    Sir mai jab phpmailer ka use krke OTP email pr send kr rha hu to ye mail send function 2 OTP generate kr rha hai aur database me bhi do OTP save kr rha hai to sir iska koi solution ho to bataiye
    Pls sir bataiye mai 3 din se try kr rha hu but koi solution nhi mila

  • @learnwithme_odia
    @learnwithme_odia Год назад

    sir i am totally new and i don't know how to configure smtp and mail server using php. can you make a single video where you can create a html form and submit the data into the data base as well as admin email recive using LOCALHOST and after that how it will configure it into live domain

  • @zero_n_one3782
    @zero_n_one3782 4 года назад

    Thank you for your wonderful videos once again. well i am still having trouble to send email to my account although i get updated to my database. I tried first with sendgrid but was not able to send and again i tried with gmail as smtp host but still its not sending email to my account. As i set my account already as you told in videos but not helping much. Please help me to figure out the real issues with the code. Thank in advance.

    • @ProgrammingwithVishal
      @ProgrammingwithVishal  4 года назад

      No worries! Share your Anydesk or Teamviewer details to my id phpvishal@gmail.com

  • @bibhudattapurohit6159
    @bibhudattapurohit6159 Год назад

    Sir is the code will work on localhost? I try but it's not working

  • @MONISHKHAN-uf4xr
    @MONISHKHAN-uf4xr 3 года назад

    Sir but I don’t understand how it work when anyone type their mail id and it will be show us their mail with their mail id

  • @Uk49s_boom_boom_prediction
    @Uk49s_boom_boom_prediction Год назад

    Bhai mail to store ho raha hai lekin email not received? i am setting done on my Gmail account still not receive mail

  • @jaydeepsapariya8532
    @jaydeepsapariya8532 3 года назад

    code is not working in live godaddy server pls sir...how to solve

  • @ajaydeuskar867
    @ajaydeuskar867 Год назад

    gmail smtp is no more active...any other procedure to accomplish this? please respond. Thanks and Regards.

  • @rajeshrathor4307
    @rajeshrathor4307 5 месяцев назад

    Is it possible without using Gmail SMTP??

  • @rezaulhaque5751
    @rezaulhaque5751 4 года назад

    Nyc video sir...
    Is it compulsory to activate less secure app. If we want to send email to other person but he didn't change his email settings. Then how would he came to know about our mail. Is their any paid services for sending mail...

    • @ProgrammingwithVishal
      @ProgrammingwithVishal  4 года назад

      Secure app needed from SMTP account only. Means the email id that you are using in SMTP login

  • @aachalshah9345
    @aachalshah9345 3 года назад +1

    There are some errors showing when executed..

  • @beapakistani6233
    @beapakistani6233 2 года назад

    Hello dear i am trying to send data to customer, for there order details like if they have order 5 products so how can i send them by email kindly guid me its urgent

  • @VIVEKKUMAR-fd2it
    @VIVEKKUMAR-fd2it 2 года назад

    Sir, Databse me only 1 hi data save ho raha h .
    How to solve sir?
    or id ko primary key se hatta rhe h to ...fir all data database me save ho rha h

  • @chandrashekhar-lx6fc
    @chandrashekhar-lx6fc Год назад

    Sir how to form data send as pdf format in mail ?

  • @programingwithsagarsharma6544
    @programingwithsagarsharma6544 3 года назад

    Mana sir ya code use kiya ha aap ka download kar ka and aap no jo settings karna ko kha tha mana vo bhi ki ha par ma mail nahi sent kar pa raha hu sir plz

  • @sarvagndevarshibhaipathak6793
    @sarvagndevarshibhaipathak6793 2 года назад

    sir, the ajax part is not working correctly! plz help

  • @mr.rkayji749
    @mr.rkayji749 3 года назад

    11:45 for my reference

  • @SureshKumar-qy1bf
    @SureshKumar-qy1bf 3 года назад

    iske sath document kyse send kare sir please help me

  • @shanilpatil3176
    @shanilpatil3176 4 года назад

    Vishal ji ek question hai ki php mysqli me current date ke record ko find karne ki query kya hai?

    • @ProgrammingwithVishal
      @ProgrammingwithVishal  4 года назад

      Uske liye apko jab bhi koi record db main insert hota hai uske sath date ko insert karna padega. And sql query wahi date se data fetch karna padega.

  • @jahanvimathur6570
    @jahanvimathur6570 Год назад

    Sir mere less secure app access ka enable nahi ho raha google ne ab yeh option enable ka hata diya hai mein kiss tarhe yeh ker sakti hu iske karan mail nahi aa raha mere pass can you please reply

  • @programingwithsagarsharma6544
    @programingwithsagarsharma6544 3 года назад

    Sir ya Aa rahi ha
    This page not working
    Is currently unable to handle this request
    Http errors 500

  • @weqarfatima4377
    @weqarfatima4377 3 года назад

    Hello sir
    Mujhe ek error aa raha hai jab me mail send kar rahi hu tab fatal error jo phpmailerEXception: SMTP connect() failed bata raha hai
    Kaise solve karu please reply

  • @akashsrivastava947
    @akashsrivastava947 3 года назад

    Setfrom error aarha ...undeefined method PHPMailer aarha

  • @spikygaming7345
    @spikygaming7345 2 года назад

    code is working but mail not send plz reply

  • @kapauuhost
    @kapauuhost 2 года назад

    How Create Database at localhost

  • @mansinayak10100
    @mansinayak10100 11 месяцев назад +1

    i can't find less secure apps option in my google account

  • @supriyagavali7220
    @supriyagavali7220 4 года назад

    How to validate the form...because empty data is also get filled

  • @mdonline979
    @mdonline979 11 месяцев назад

    Contact page Mai file attached kor Kay .. data ko database send and email kayse kory