How to show success message on form submit using sweet alert in php

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to codinghero enjoy the video today I will show you how to show pop-up menu after register page [Music] let's start the video first you have to start xamp server [Music] this is connection.php file in this file we make connection to database let's start coding first you have to start PHP tags in connection.php file first create one variable in this variable we have to provide host IP means your server IP default server IP is localhost but if you add Port then provide it with colon [Music] [Music] in dollar user variable I provide username default username is root default password is empty [Music] foreign [Applause] [Music] [Applause] [Music] database variable I provide my database name which is YouTube yours is different so provide your database name in this variable [Music] if you want to add Port like me then open zamp control panel and click on my SQL and select my DOT any file and in this file you can add or change my SQL Server port [Music] thank you [Music] [Music] foreign [Music] function it will connect file to database [Music] [Applause] [Music] [Applause] [Music] [Applause] [Music] then I will make a fel's condition to check the connection to database if database is connect then it will show connected message and if some error occurs then it will show not connected foreign [Applause] [Music] file is connected to database [Music] then create register.php file [Music] foreign function will include connection.php file into register.php file [Music] [Music] I don't want to waste your time so I will copy code of register page from West school I will provide this register page code in description or comment box so rep where it wants [Music] I want to make some changes in this form so it can work properly so let's change it you must have to set form method to post method so data can be accessed by post method and PHP file [Music] foreign [Music] [Applause] [Music] name to submit so it can access by name with post method suppose if you want to make condition after button click you can do with this method here my email input box name is email maybe yours is different so provided by yourself foreign [Music] then you have to store input boxes data to separate variables so it can access easily [Music] [Applause] [Music] thank you [Music] [Applause] [Music] [Applause] asset function is used to check a submit name button is clicked if clicked then you set condition by yourself here I want to register data to database [Applause] foreign [Music] [Applause] [Music] [Applause] [Music] [Music] then write query of insert data to database table and I will show you how to make table in database [Music] and that how you make table and database here my table name is video you can name your database what you want you can provide column name column type column length and Lower Side of table name and click on save button it will create table in your database foreign [Music] [Music] [Music] [Applause] [Music] [Applause] [Music] [Applause] thank you [Music] foreign [Music] after this you must have to run insert query so you have to use miscally underscore query function to run insert query in this query you have to provide two variables dollar con which you make in connection.php and second dollar insert in which you store insert query foreign [Music] [Applause] [Music] [Applause] [Music] [Applause] thank you then if you want a pop-up menu then go to Sweet alert website and first you have to copy script form code and paste it to below title tag and PHP file and after this scroll more you got some type of pop-ups and then copy of code what you want and paste it in out of PHP extension I will show you in video later so don't skip video and follow all my steps [Applause] [Music] [Applause] [Music] [Music] thank you foreign [Music] [Music] [Music] here I forget to end PHP so script file can work I forget that you're smart so don't forget to like And subscribe [Music] [Applause] [Music] here data will not insert it to database so there is some mistake in this file so we have to find it [Music] a few moments later [Music] here there is mistake and spelling of password that silly mistakes can take errors on your file.so code very carefully so as you can see pop-up menu was successfully loaded and data is inserted in database [Music] [Applause] [Music] [Music] so if you like the video then subscribe it will mean a lot of good day bye bye [Music] thank you
Info
Channel: CodingHero
Views: 20,646
Rating: undefined out of 5
Keywords: how to use sweet alert in php, how to show success msg in php, how to display success message after saving data in php, how to show status message using sweet alert in php, display status using sweet alert in php, message in sweet alert, how to show success message after form submit in php, CodingHero, Registerpage with php, how to show popup menu after click submit button, sweet alert php, sweet alert, sweetalert, sweet alert javascript, CODINGHERO, sweet alert in php, codinghero
Id: Ig7aLU3TFQk
Channel Id: undefined
Length: 14min 39sec (879 seconds)
Published: Wed Nov 30 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.