Insert Update Delete In Php With Ajax Jquery

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys welcome back after learning basic knowledge of Ajax with the help of JavaScript we will able to create a project so I will teach you how you can create a project with the help of Ajax and also finished in this time I will use jQuery to perform the edge x+ so guys we need to use bootstrap to design the form and also table and also we need to use jQuery so I need to download and configure boot step so I use root step and then open the first line and connect it all and download then you need to wait couple of seconds to download the boot step on your computer open showing in Florida and cut and go to your project folder and paste here right-click it and extra and delete the zip folder and go to CSS folder select all files without put a step toward CSS files remove the whole files okay and go to J's folder and select all files without boots step-touch is right we need to also include jQuery file so I go to Jake Chile it says Jake get in here okay I think you cleared our home okay I hope big guys and I download gqt and complete version but this is our file I will include this file another I drag first I open code editor and I drag and right couple of seconds a job right CSS folder NGS folder just a minute CSS folder NGS water inside the J's folder I will create a file jqd torches and go to browser and select the alcohol J click or copy that paste here and then set the file close this file and I will get a file index.php try the basis index of HTML because I will check the boot step working or not and I need to get the file yes this is for the name and this is a file I check watching our chicken mr. I use class display for right said that and then open the browser first I open okay just a minute I use localhost route desk HX how'd you get Casey you are as you can see guys the forms has been changed no no we need to also use float away some icons so I will use fonda with some icon I'll go to google.com and I use font of Assam open the first link and then just do it aunt always phone to listen like one then you need to use I mean include the Mona Lisa Mike on guys I will use font away some icon so I'll go to font away some official website and I use font away some web the font always some will be downloaded on my computer and a couple of seconds to download the font of Assam okay guys I check it the another things that will help you to use font away sir okay so font of Islam has been downloaded on your computer then I cut the front of a sound folder and go to my htdocs folder crowd and data folder is found false and best zip folder that ever found out some icons and also files right click it and extract then you need to wait a couple of seconds guys then I need to remove these file and open the font alyssum file cut default web fonts so I opened this file so I cut the whole file then go to font alyssum pastry I remove this photo okay no we need to also use font always some CSS file so I check it to where the CSS file I select start and I select this URL guys this URL click update and placed here this is a CSS property that will help you to use onda guey some icons i create a file inside my boot step I mean CSS folder I use phone start CSS there's the pod said that and include this file also CSS / 4 starts missus okay and I check it default a lesson working or not so I use this pen take and instead I spent a guy use user FA F user said that and let's check in on the dosa what is the more file for novice and doesn't work on mmm OnStar ceases okay I select the folder with some like Concord as I cheated and I copied that and best said that and I fed that okay I need to set up the front of it some fire okay so I think I need to change the folder name because the folder name and file name is same so I change the folder name I use false this waveforms okay said that and let's say you know in the process I've been a key and then I use localhost flesh child for a checks as you can see guys phone tourism has been appeared if I want to change the icon if they use a cell let's shake it no and as you can see yes so we have successfully included the font abysm CSS file font aways some folders put the state file and also we need to check the module because I will use model Buddhistic model to get the data and also insert the data in the database so I use bootstrap model I will teach you stay right there but this time I will use a chicken guys guess why copy the code this code and paste we need to also include the script sudsy sauce just folder first i use jquery dot JS file script GS go to step down JS file ok save that and let's check it now model working or not as you can see model has been appeared on my screen so we have successfully set up our project so in the next video I'm gonna teach with you how you can design the farm table and many other things so thank you very much for watching see you in the next lecture guys hello guys welcome back in this lecture we have discussed all about how we can set up our project in this video I'm gonna teach me to you how you can design your project so first I change the name of the title I'll write that like so first I write the comment I just wish first I did just know I will design the pattern give us that idea Santa Claus send a class call and say the call I call card cut so the card I write a card title and so the hard title highlight pattern okay I clear the pattern and I just checked our target gestation this is a basically ID I will use this ID to create a model right and I use also try pattern plus B T and D channel and I and you register a new user said that unless check-in all of us right this is our button inside and the button in the back end have up card but I changed the particular is star is class just applies seven let's not right this is our button this is our thought but I will use margin-top file right and I will use the card margin-left fire okay and imagine top and bottom true okay this is our cart okay and after the car title or a dead deer and I just class hard body inside the car body right there and assigned that idly travel okay I'll get a tape along later this time I just assigned the ID right now the next one is that I want to create a model and when user click on the button then model will appear inside the model I want to display the user name and password input text fields so I keep the model I write the comment station just like call here and assign a class in water and I sign the ID registration without hash sign then I called here and I call class model dialog then call them class model content laws model header inside the model hater I write it still take and target registration form outside of the model heater that idea and the Santa Claus model body inside the model body I called farm cake when I remove the action ok I use input tech fields class farm control and margin top and bottom too and I use place folder user mutant lead second in protect field in an ice mouse farm control margin top and bottom to place holder and user enough I say that and that's it now I click on the button but I can't see the module so I think something is wrong so I check it and get a target he's a cha-cha go let's you know the chopper he's a mistake okay I think I need to be more okay as you can see guys and protect field but I can't see the title key st data model Hever HD from registration but why I can't see the model heater content registration for my Santa Claus next time then I just said that and let you know I okay guys now after the body take this is a model body tag I can tell and cos model footer inside the I called / - and it is type button' class be champion success registration just enough then I call another button I missed I protein plus beauty and beauty and danger I'll use actually dated dismiss any user click on the close button then I want to close my model say that let's check in now right first name last name I click on Klaus okay did at this it's right everything is perfect we have successfully design our model in the next video I'm going to teach with you all you can use jQuery to get the data from and protect field and assign the data and PHP variables so thank you very much for watching see you in the next lecture guys hello guys welcome back in previous lecture we have discussed all about how we can design the project in this video I'm gonna teach with you how you can get the data from input text fields using HX or you can say that using JQ so first i need to assign the ID on each and for that field i assign the ID Uslan man this is the first and protect field and this is a second and productive citizen ID user in safe and then I will get a my butt's knowledge as far I like my chair starch as far in this file I will use jQuery code but we need to include this file inside my index dot J's file is the script source J / my J starches right then I check the chicory working fine are not so first I use dollar document parentheses function parentheses records if our document working fine then I want to display the other products working say and refer the page I can't see anything else I check it document already here is a mistake seven let's check okay as you can see guys what it means jqe file has been successfully included on my index dot PHP part now let's get the data from in production so after these fantasies I keep the function I will create function for different work this function will write insert card and the database I call function functional is insert parenthesis first I need to get the data from input text field so I use where this is a variable called user this is a variable I called dollar single quotation inside the single condition we need to use user name this is the first unprotect field in I mean ID I will show you just a minute this ideally user name then we need to use dot well parenthesis and also we need to get the data from input that field second and protect fields values and then I call console I check the data coming or not from and protect clear so I call the user and we need to call this function inside my document dot ready function say and I trace I go to developer tools and I click to add new register I mean add new user and I in turn is an M programmer and in every online LT th dot-com that place register now ok we need to also use this pattern to generate the event I cut that and I call dollar document dot on parenthesis this is the event name today where you want to use the event I want to use event on each yen register I check it the button and I'm in pattern ID I need to assign the ID 2010 the Chester Virginia register and even user click on that button then run this function ok inside this function I press the like they did a famine protect fee and all the data on the console screen so I refer the page and click to a new user and I assign the lady programmer programmer a gmail.com you just don't know as you can see that's programmer and program at gmail.com we have successfully cared the data from input text field right now the next thing is we need to create a database but I have already made the database and also I have made in the table I will show you I go to local host PHP myadmin and wait a couple of seconds to open that and I go to below and this is my data based testing and said that testing that I was able to one table username I mean user record inside this table here are two columns three columns first one is ID secondly username and third one is the user email as you can see ID user name and I will use this database and also table to store the record inside this database using Ajax okay so I go to my code editor and I kill you the folder outside of the GS for I clear a folder any tributes and so the include folder I will create a connection and by the best six centers of PHP and I can dollar coin MySQL connect pastilla parameter for parameter localhost root username personal database name is testing if I use database is not stable then come into the eighth body and display the message I used I please check here connection I use my skill I that are function 10 minutes and said it and we need to also create another file inside my include folder I clear the file function stop inside this file I will create a function inside this file I will create a function to perform the different tasks like insert update delete and many other things so guys in the next video I'm gonna teach with you how you can restore the record in SATA data bus so thank you very much for watching see you in the next structure guys hello guys welcome back in this video I'm gonna teach with you how you can restore the record inside the database and before working honest or the record on the database we need to use validation the validation is very important to store the record on the database for example I opened my project and I click on add new user and when user click on the register now then those fields are empty it means you will able to store the input fields inside the database but this is not good for security purposes so I will use validation any when user click on the register now button then who will able to see the error message please fill in the blank after enter one and second in protect field data then who will able to restore their quadrants at the database so let's do that I go to my code editor and I use if statement if the variable name is used that I came true blank or email I kill to play then come in the F body and then I call first I need to assign the tech and assign ID I want to display the message on the model party so I called paragraph and assign ID message right then I call this message ID to display the message I used dollar parenthesis hi sign means ID I call message this is the ID name dot HTML please fill in the blanks so that unless chicken love thank you look add new user I click to register now I can't see the video the video is that basically is a I mean white text is white but I assigned the class close that and I referred it and then click 8 just an odd place for them that banks right now the next thing is I go through my Jess dot J's file if the both fields are not empathy anyone user will enter username and password then who will come into the else statement in the LC statement I will generate eject request so I use dollar dot HX parentheses inside the parentheses you need to write scrip records and say they duplicate you need to pass the parameters or you can send the request into PHP page so first you need to buy the URL where you want to send the request I use column single quotation I call answer dot PHP page I want to send the request on insert dot PHP page and use comma then which method you want to use I use method post' which data you want to send into insert or PHP page I file data column split brackets assigned any name for example I write you name : inside the you name you need to assign the first and protect field then you will use you name in the PHP programming language to get the data from this file okay then I use comma and called um er : and second variable that will get the second data from input text field test it then I use another statement like success anyone I mean everything is perfect to display the success message I call function parentheses inside the parentheses function penalties that I need to pass parameter one you can write any name on here then and I mean inside the ecliptic gates I just called the this message and I write very no I do not write the bed I just write the HTML and said this HTML I pass the parameter like data okay I will use echo statement in the PHP language that the PHP language data echo statement will appear on here okay now the next thing is I think everything is perfect next thing is I call not Heidi this is a model I do key design illustration this I develop here called model don't show this message will appear on the model box so we need to use registration model touch show right then I go to function dot PHP file inside the function dot PHP palette called the sixth index of Phoenician and I call it function insert function I shall function and sir this is the my PHP function inside this function you need to first I need to include the file connection file PHP answer this function you need to write that the low power and variable name connection variable name okay then I make a variable like user man then I get the data from JQ fire I call you name this name and paste here I call you sir post and pass you in the light then I check and say the cout statement I called easily comma if everything is a perfect then username and email will appear on the model box but I need to call this function so I clear it another PHP file outside of the include folder I cleared unser dot PHP file and by the basic centers and paste your connection I mean method what do we need to include the higher ones includes functional visual type because the function available on the function ok then I check it all right little in the blanks I write gamma mu net there are online IT chip stock to register now as you can see guys programmer and admin editor at gmail.com it means we have successfully get the data from the jQuery file and to PHP programming in English okay after getting the data from jQuery file are you can say that the JSON I mean HX then I call QT theory is insert into my table name is the user your call I will show you just a minute use the record as you can see user the column names is user I think user name is I checked it user name okay first column name is user name user in our second column values parentheses single quotation but the first variable in user name comma second wherever terminal design then I call result variable in columnist like Curie past two parameter first one is your connection second one is a your Curie then I call it the result variable is active I mean is that correct and I want to display the message your god said in the data list otherwise coming back Elsa statement and the cout statement please check your Curie right that's very simple say and let's check now first I refer that and then they used a new user enter my username and email and there's register no please check your Curie first I checked it that it Alice okay I think something is wrong on the Qt section insert and to use a record username username username user email and reduce there is a mistake I said realistic I need to just comma and come right sir and let's check it now again close that first close that and if at the page and to add new user and I intervener enough just to know your card has been saved in the database let's check it now in the database as you can see guys one programmer program wanna EDG mail.com now the next thing is I go to my project after I store the record inside the database we have seen the message your code has been saved in the database and also we are able to see the both fields available inside the first and second input text field but I want to remove the first and second input text fields after restore the recordings in the database so I go to my code editor and I'll try to dollar parentheses in a caller form this is the farm take sugar parentheses and I call reset say and let's check it now again and first out of a bit okay enough and I called Edmund Edmund a turret online ITT use calm I just don't know as you can see this both kills our empathy your God has been saved in the database let's check it now right but no and that thing is I closed the model and I click again a new user we are able to see the same message appeared inside a model but I want to click on the close button then I want to remove this method also so I will generate event on the close button so I go to first I brought in text remote I got index dot PHP file and I find the key lost model this and it was signed ID like a teaching close and I go to my chest art JS file outside of the Ajax request ok this is a complete I mean this pattern okay this is a closing and closing parenthesis I will generate the event how document and I called the better name I'm in button ID BTN clause then I got a function inside this silly briquette I called dollar first I called reset the family I also used to reset the reset and I call this ID I mean I call there is a message this message copy that and paste a and I can remove the extra say and that's it I'd like to add new user I write anything else first I store their product I use the developer in the tip up or HG dot-com we just don't know right I closed that and I could again edit user as you can see guys so this video is too long in the next video I'm gonna teach with you how you can display the card and satisfy so thank you very much for watching see you in the next lecture guys hello guys welcome back in this video I'm gonna teach meeting you how you can display the record on the same page so I will create a function inside the JK 5 so I call just play the card this is the mod comment and then I use function inside that I need to use Ajax request an emphasis detectors inside that is Cle picket I pass the URL where you want to send request I call you dot php' comma which method do you want to use I used post then everything is the perfect then I won't call this function 26 inside this parent is like a spawn parameter and so the s-clip ticket I use same data valuable and I use dollar dot parse JSON parenthesis and pass the data they it means I will get the data from pshoo page and assign the data in the data variable using JSON format I will use also JSON encode function and set the PHP code but this time I have used parse JSON method that will help you to get the data from PHP page and assign the data in the data variable then I use simple if statement and called data variable dot status to success if everything is the perfect then I want to call if body and write a message console dot log data ready right then I call this function of the debt tester now the next thing is we need to create a function inside that function dot PHP page so this is answer function outside of this duplicate I write display function I call function display first we need to use global connection value then make a variable write anything and as I indicated first null then call the same variable and use concern single quotation and Terminator Sun and so the single question you will write the table text so outside of the PHP closing tag I will write HTML tags I'm in TurboTax all right travel and remove the closing table technically right the classes travel time powder and use TR and said that TR you Stevie I use user ID this is the my stated data okay user email use Malachy also I need to change that username and chilli add it chili delete applet then I copied that I cut them basically and paste inside a single quotation then I call QT variable and use QT select change it strong and use the record this is a method of a stubborn then I call this a variable and my scale i QE pass to parameter first one is a year connection and second one is in your queue available then I'll use while loop and make a variable call you small scale i underscore fetch associate inside that you need to pass result variable uses libera care inside the S clip records you need to pass the same medieval if this and use concatenation sine and a cosine then you need to use single quotation and telemedicine inside the single quotation you need to copy the TR and TD tags and they stay late I rent that okay now inside the user ID chili I use single quotation two times inside the single quotation you need to write dot dot and call row variable that will get the data from database this variable and use brackets inside the bracket you need to call the database column name each column name that will help you to display that it on the frozen remove the second one TD then you see a patient or third row username this is the database column name user then outside of the wild lip body then I call the same variable will un use concatenation sign a kill science single quotation Terminator sign inside the single quotation I need to kill all the table tech then I used for statement and use Chase and encode method parentheses inside the parentheses you need to use brackets and say the breakers you need to use status status outside of the coma are single question you need to try a case I'll get a denser and then you need to write single quotation and use success message or you can assign the success then I check at the time throughout this video stupid then I use comma and single quotation again and write HTML you can write any name then I used cosine character turns on and pass the billion variable that will get the complete database record this data I will assign on the JSON format JSON format okay and this date I will create inside the data and variable right but we need to clear the first I check it okay Jason code status success okay I need to create a file view dot PHP and said the real dot php' are right basic standards of creation we need to include two files for advanced first manager and can use folder functions dot PHP file then require once includes you got PHP file no connection or feature then we need to call the function P if we function ok copy that and if everything is the perfect then you will able to see data will appear inside the console screen as you can see it but this data is the object for me I want to convert that into HTML format so I go to my pod editor and I go to my chest dot here's five after the data I need to use dot HTML format sir and if at the page just a note give what his problem did a lot missed you it's too surrender fish again as you can see this is a readable and HTML format recount I want to display this record on this page so I go to my coordinator and I have assigned the ID inside the index dot PHP file where is that tavern okay I want to display the card inside the card party section so I will target in the ID table ID okay to display the database record so I go through my J start J's file and remove the console I use in dollar parentheses instrument travels slide I use HTML data so and that as you can see we have successfully stole their car I mean we have successfully used jQuery AJAX to display the database record on the same page okay I want to add record I use designer to register now your God has been said but I can't see the record inside my table I refer that as you can see but I want to use Ajax request to display the record on the same page without refresh our page so I go to my code editor and I copy this function you recall this is a JQ 5 and I go to a bow after the stroller card inside the database I best method then I said that and I go to browser first I refer that and I use and gmail.com we just don't know as you can see my number five and oh dear and enter do at gmail.com we have successfully seen in the database record inside that travel and the same page I hope you understood as well guys thank you very much for watching see you in the next lecture hello guys welcome back in this video I'm gonna teach with you how you can get the particular record and the model after getting the record in the model then we will able to use update process okay so I will create a button inside the each column I mean each row then we will click on the button then we will able to see the module inside the model I want to get that particular record but so first I go to my code editor and open the display dot PHP file I'm in function dot PHP file inside the display record function every three rows one two and three after the three rows I'll use pattern tag button close then I assign the classes the chain pitch and success and assign the IDB Jian added and also I use attribute data ID you can write any net I use little science single quotation inside the single quotation I'll need to use two or dot and calc row dot single quotation and your database column first column name ID that will get that particular height right inside the button tag I use span tag and I assign the class FF edit first I check sir and let's check it now right we have seen the button and say the button here icon this is a form ELISA Michael right I want to click on this button then I want to display the particular ID inside my console screen so I put my code editor and I go to my Geo start gs5 then go to below and get a function function get call this is my function and drink is easy speed records first I make a variable and write the variable name then I use nobody's first I had generate the event on killing so I use dollar document dot on click this is a click event where you want to use event I used has signed BT and edit this is the button ID as you can see update and festive anyone user click on the BT and edit button then commenter's function and set this function i generate the particular ID I mean I will get the particular user ID so I make a variable write the variable name musical sign and use dollar parenthesis and use this this means this button this button ok this button okay this means this button object you can say that this pattern okay and then I use dot jg teeth are means attributed where you want to get the ID i could function that PHP file this is the basically important attribute that will get the ID particular row ID inside the row have a particular account database record okay it's copied there and test first try you see a photo showing tested use Terminator sign and I want to display the particular ID on the console easily first said that and go to browser prefer the patch and - first one accounts anything else why I can't see anything else on the browser because we need to call this function guys copy that and yes there let's check it now again click - one as you can see guys we have seen well I click on number 5 and this is the fun it means we have successfully received particular ID with on kill it right now the next thing is I generate the Ajax request parentheses today first I check that time through out of this first I call you URL and where you want to send request I use depth data dot PHP page then method is paused and also we need to use data what data you want to send into K data dot PHP page I use our user I did this is my unique name and assign the this ID variable then I will use this user ID variable into PHP language then I use comma and you need to also use another type like data tie I use JSON comma then I use success function parentheses straight inside the function I need to pass the parameter right first we need to use this method now the next thing is we need to create an get data dot PHP file copy that and you know I go to function dot PHP file okay then I treat a function basically outside of the period-accurate function we call a particular function Global connection variable and use the variable first variable use I you can write any name and user underscore post and inside the brackets you need to pass this variable okay you use terminal design then you need to use curing the Curie is like static from user cog this is your travel and into the base table and then you need to use where keyword and first column name equal sign single quotation and pass the user ID variable right then you need to write the result variable column is key like URI pass to parameter first one is that your connection second one is your chili variable then you need to write while loop and call row till tomorrow still I fetch associate and said that you need to pass the result variable then you need to use the brackets and then make a variable I used it user data assign the value not right then colicky user you must come teacher you just and then I use basically Brigade this is the call first I use zero and inside the zero index I have a sign I will assign guys the first column name okay that will get the first column ID then assigned that I did inside the user data array complete IDs okay not a single like and Col user in the scope data number one this is the index number one all row and the first second data is predominant reason and it's pub date here user underscore data second index second areand X I will assign the user another then outside of the scribbler gates I call the core Jason in court and quarter use parentheses and said the parentheses you just need to pass the user data variable right then I go to my GS dot J's file inside the success function icon console dot log and I called data and used gray zero then I want to check the data will appear on mod inside the console st first I referred that and I clip to one okay we need to clear that game data dot PHP file I get a get data dot php' get underscore data a PHP file I think this file okay yes inside this file I use profile and once includes functions PHP no one's connection dot PHP file and called give data function okay this function still turning the dress on say that and let's check it now again hmm I think I can't see anything else but IRA fish again not I go to my gesture just fine and I use Alceste no first I check it did it a dot PHP and a tidy dollar checks you are a deterrent PHP get underscored rated R please repost Society Jason function data and go to get it uh no functional piece me check it guys yet God mmm anything is a perfect but why I can't see the value right fancy so a chicken guys there is a problem get just a minute guys I take it now I go to function that PHP file no you get it at our peaceful father function or PHP function dot PHP okay okay here is a mistake guys this gated @rp file have outside of the includes four and the connection file available inside the includes for us so we need to use in cubes backs resign and connection then I think everything is perfect I check it I click to fun this is the idea click - - I collected three for fun right I've used data zero but I change the number then you will able to see the username I mean user user data this data trust benefit that and I click - as you can see I click - next one at me I click to fight I change the number this is the array index numbers right that as you can see get lost panicky so if we have successfully received data from the PHP file and 2gq so we need to create a model but I think this video is too long in the next video I'm gonna teach with you how you can display the data on the model so thank you very much for watching see you in the next lecture guys hello guys welcome back in threes lecture we have discussed all about how he came gave the complete row record using on correct I want to display the complete row record on the model so I got all the detail and I go to index dot PHP file and say the index dot PHP file I copied this module complete module which said that happen because I want to teach you some informative knowledge okay so I use Wester then I changed the title like update form and then I need to change a few things I change the ID you team you pee and change the new update change the pattern ID BG and update and also we need to create basically info text field assign that type hidden' this input text doesn't appear on the cross I will assign the ID inside this intro text then I will get complete one two and three record to update that and I changed change this message ID you'd be updated everything is perfect then I go to get it a lot PHP files no I get a function that PHP file no I got my J starches fat inside there I call dollar first like out dollar parenthesis and say the similar condition you need to use you P username conversely I also got this terribly yupi username I assign the real identities big data brigades number one and the number zero here are ideal right so I his darlin UPN desk or user you know they also signed the hairstyles first I assign the name race use it I you can lost planet 3 loser okay and I can't dollar either idea to assign dot well nature then I want to display the model so by good index dot PHP file and I need to change the module ID go to my dear starch is fine and con dollar tech tips I'm in parentheses and model name dot sure then everything is perfect I think everything is perfect so I check it everything is perfect or not as you can see guys we have seen update module form and particular record on the model a Claudette I click on the last one as you can see right now the next thing is I will create operation like update now any user click on the update now then the record will be updated so in the next video I'm going to teach with you how you can do this so thank you very much for watching see you in the next structure grace hello guys welcome back in this video I'm gonna teach with you how you can update the record any one user click on the edit Now button then who will able to see the user name and email then I want to use Update button process to update the record of the update the record the user will able to see updated record inside my table so I want to work on the update now button so first I close this module and I got my code editor and this is a my JSTOR J's file I will create a function update record function update the card parentheses stupid first I will generate event I use no I will get the data from updated form this is the updated form you can say that module inside the module have a three fields you P username you P user email you P user ID if you want to array that you can do that I cut that and test it right then I will get the user ID username and use their email from 1st 2nd and 3rd and protect it but the first input text field have a hidden type it means you can't see the first input text field on the module so I go to my magister JS file I will write a variable and I called update ID this is my variable I called our first input text field name which have our ID give you P user ID pastor talk about you same process update user and yupi username here son pastor doc well update email dot Val parentheses terminal design inside the similar quotation you need to pass the user ID available I mean user email variable or ID then I want to check everything is a perfect then I want to display the fields data on my console page first I call update ID before using console dot log we need to generate the event button click OK update button click so I call dollar document dot on parentheses which event you want to use I want to use to the event then where you want to use event I want to use a when reaching update this is the button ID called function parentheses brackets and say that I pass the console dot log and set the console dot log entities I call updated ID updated using updated email said that and let's check it now but I need to use this function on the bow document already okay tester cell under check it now Akilah can edit no first I use ctrl shift I to display the console page and I click edit update now I can't see anything else on the console screen rearrange that I use update ID sir iron first prophet I can't see anything else inside the console screen but i refresh it again localhost get all their checks this is under fire a I can't see why I can't see the idea dollar update to user dot well one small dot log click first I check tea party working are not fast at it it was console watching then I check data coming or not working button click event has been button fun right but why I can't get the data flow and protects thieves mmm I changed it I shut that and just inside this function okay then I check it i just console.log update ID update user terminal design and that's check No edit alright 5 sampling first a developer melon soon as you can see this number one full estate developer programmer at gmail.com but I want to use security 5mm when user enter empathy field I mean use empathy field and click update now so I will be able to see the error message please name the plane you need to use the security secret is very important so I cut that and I just easy statement and call update user variable teaching empathy or update email variable they tell to empathy coming back to the brackets and and I go to document I mean index dot PHP file and this is a mile there are after cranky and say the paragraph tag have ID u P message I target this ID to display the error message HTML is fellow and the planks then we need to use module to display the module Marty name is update dot monster let's check it now I felt that to divide it remove the first and protectable data as you can see gets please fill in the blanks okay I enter another information I need to use the ELSA statement because I have used if a statement if both fields are entity then display the error message otherwise coming to the ELSA statement and generate that HX request so I call product of HX parentheses display vectors first community is you are there you want send request I want to send requests are update or PHP net that I just post data I use UID this is a my variable and assign the first input text waiting you PID I would use u ID u underscore ID any PHP programming language by then I use any name I use you user and assigned update user variable , are you in a column and update in the available comma if everything is a perfect then coming to the success section and pass one parameter inside the success section I copy this code and paste here and I change the text I passed this data variable said we need to create a update dot PHP file so I get updated PHP file inside the update dot PHP file first I write this eccentric soft Englishman but we need to need a function okay there is a function file function we need to create update function of death function you can write any name then I call global dollar underscore and connection and then make a variable I use update underscore ID i D the thalamus compose I have used post meta to get the data from J Kilifi like so I called you I D taking top function Phi there okay then I use update we use a telescope post and go to check in five and copy you underscore user rated I did underscore email double smoke post and go to my chest r JS file check it filed past you and ask or email kilometer okay then I need to use curing the cure is update user underscore heart heart said you need to select the database column name username username equal to single quotation Akal true this username variable comma user email this is the database column name I will show you just a minute this user email variable I mean database column name the children this variable then use their and first column name first database column name the database column name is ID it came to our first variable this is a basically update cleanliness copy that and paste it use termina to sign and called reserve variable but my scale IQ e pass to that I'm the first one is connection second only the CUNY variable if editing is a perfect and I called dessert paid even inside the F is 13 and this leather quest up man you're the card is in the alt sister trend I'll use please check save that and we need to call this function inside the update dot PHP file so I go to update dot PHP file we need to get the pie pans and killings functions.php file require advanced includes connection doc and message method net said that and go to on the project refer that I change by the user user eight.com your card has been updated okay close that and I'll fill the page user user I've seen under founded circular in that database user user at gmail.com but I want to change the value after updating the card inside the table so I go to my code editor and I just need to copy the updated function no I go to view record function of the debt and test after the updated after display adapter message and this method if at that and let's change in the second video I use for idea for Eggman and chill about pump click to update you know as you can see this I closed that is your instruments and thought I just write in the word adept now as you can see this so we have successfully make update process to update the record I hope you understood as well thank you very much for watching see you in the next lecture guys hello guys welcome back in this video I'm gonna teach VT how you can delete the record so I go to my code editor and I go to where is the display dot PHP file first I said that and display okay I go to function dot PHP file and say the function dot peace forever display function display record function okay so first I copy the pattern tag and also everything without TD take K and paste here and then I also assigned the same ID but I changed the data ID attribute okay and then I also change the font of Assam icon and also I change the background color of the button say let's check it now as you can see right now the next thing is I go to gqe file and I go to index dot PHP file I copy the module mystic I just need to knowledge complete thought this is a title of the model and inside the body I remove the form I just copy or cut the patterns and paste it and I removed the footer section from this module okay and I also removed no I believe that okay I use delete message okay this is a basically paragraph tag and I am assigning the ID message I change the button and greet and okay I also use the stylus paragraph tag to delete the record and well the Apple user will be able to see this message on the module if anyone user will click on the delete Now button but I need to change each and any user click on delete no but and then we will able to see record will be deleted right okay everything is perfect mmm I got my gesture chest file and I create a function function see the text first I can write the event document on slick and I use the display dot PHP page okay i generate the event wait BTN delete this is the display function inside the display function have a two buttons first one is that edit button and secondly the PT entered I generate the event wait BTN delete ok I go through my just touch as far and this is button ID then come into the function and I check it and I copy dysfunction go to a ball and get the function said let's check it now I have been indexed our Finnish beauty meat the fish up game I can't see anything else so what'd you get - gasps mmm that meant connect pretty intimate function I go to under the functions displayed or pinch me there is a disparate functions to split up in a pitch get this is a button ID my me too let's check it again just a minute guys as you can see working fine okay I click indexed or finish vintage we need to add it I can't see they're not properly but I write and his index dot PHP again and said the index dot PHP page I can't see the working fine or not but I leave that then you will able to see can't see again okay just about guys this is a browser problem okay - just a minute guys okay I go to browser and after the page and I click to delete no it's working fine right now the next thing is I get the ID from from this button attribute I will use such type show you Justin I call well delete ID I generate I get the ID with the help of this key but this means this is the basically button event and also function this means this pattern K dot attribute which attribute I use single quotation and go to functions dot PHP file this is the attribute of the delete button I copied that and said the attribute they'd add a risk or ID have our ID database column ID or row ID particular ID okay then I call dot but right I just believe that okay then I check the ID coming or not from the database so I use sir and I check it now I click on the user this is a user ID upon this is the depth did up is ID number one I click on number five as you can see I click on number four right okay now the next is we generate event I mean Ajax request so I call dollar digits I use URL column I send requests with delete dot PHP page comma which method you use I use post then I use success you know I need to use data which data you want to send into new dot PHP page I use to tell I did this is my unit name Colin bleeped ID variable the delete variable ID will assign inside that D underscore ID variable then everything is the perfect then come into the success and run this function inside this function I pass one parameter and inside the success slip break a I want to display the delete module so I use module ideas delete I will show you just a minute I need to change the module ID do it okay step model not sure and I want to display the message so I target this ID before display the message no I think I just need that the depth then I go to functions out PHP page and go to the law outside of the square bracket and generator function in the brackets first I get that data I mean ID from JQ file so I call their ID I must oppose the ID name is tell ID paste here and we need to use cutie cutie and delete use the car this is the develop travel man I think I did it Trevor no did it use the table where first column name ID this this is the basically database column name ID key and copy this variable Excel to this variable is 10% and then I use my sqli qt+ caramel the first one is the connection signal is at you but you need to include the function connection file by this global connection value then I call if our cutie okay you can come into the body and this better message now the next thing is I use as the state man and the else's truck man I use please check your connection are inaccurate right said that okay now the next thing is first I go to my gesture just five and this is a basically this button this button and you click on this button then I want to display the model and say the model have a two patterns first one is a live now second one is that close and even user click on that till now button then who will be able to see record has been deleted in our message so in case I go to J Dilla dot file dot J's file and I cut this Ajax request no I cut this and just paste here first I will show you and I cut that and just a minute I will show you how to fit that and as you can see do you want to delete the recall first one is that we've no signal is it closed and when user click on the delete Now button then the record will be deleted so in case you need to generate the event with this button okay so I target this button first I change this button name okay between also you straighten up like this then I use dollar injection mint.com play where you want to use click event I want to use BTN delete record event called function parenthesis and said that you need to press the complete Ajax request ok now I want to display the message so I go to index dot PHP file I remove that I remove that and go to a ball and I will taste it the card is hot hard body okay I hope that delete message and I target this download dot HTML and data right right that's check it now but we need to also create an index delete dot PHP file like how do you dot PHP basic sentence of ones includes functions PHP the fire ones and cubes connection dot PHP file now we need to call the delete function okay I go to functions dot PHP file and copy the function and paste you can use telnet assigned said that second not please check your tea as you can see likes please check your kills so I go to database and seek Sawa I checked the Kira basically dies this is the wrong message please check your tea okay just a minute I can't delete do it from okay here is a mistake I used to get from this is the monastic let's check it now knightly did it now do you want to delete the record yes your record has been deleted let's check it now and the world card has been removed from the table there secretin now the database I called unused a recall as you can see the report has been removed from the database but we need to also use new function there is a magic shield Magistrate chickypie so I copied a view the function that will get the database data into HTML tables so copy intestine sir let's check it now can I call delete now do you want to delete the report yes God has been divided if you want to click on close everything is perfect if you want to remove this message after a few seconds or few minutes you can decide this message how many times appear on here and guess you can use Andy dot height 5002 means five seconds that's it now close that as you can see yes okay guys so this is our simple project we have used PHP MySQL I and also edge X to develop the simple project insert update delete and we record I hope you understood as well thank you very much for watching see you in the next lecture else
Info
Channel: OnlineITtuts Tutorials
Views: 47,937
Rating: undefined out of 5
Keywords: Insert Update Delete In Php With Ajax Jquery, how to ajax insert update delete php with mysql, insert update delete in php mysqli with example using ajax, OnlineITtuts Tutorials
Id: x3OYLQFPfd0
Channel Id: undefined
Length: 111min 19sec (6679 seconds)
Published: Thu Feb 28 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.