PHP Toggle switch Update DB field using jQuery Ajax

PHP Toggle switch Update DB field using jQuery Ajax

Also Read : first love marriage in the world

Today, We want to share with you PHP Toggle switch Update DB field using jQuery Ajax.
In this post we will show you Bootstrap Switch using PHP and MySQL, hear for store value from on/off button in mysql database using php ajax we will give you demo and example for implement.In this post, we will learn about PHP Ajax Update MySQL Data Through Bootstrap Modal with an example.

PHP Toggle switch Update DB field using jQuery Ajax

There are the Following The simple About PHP Toggle switch Update DB field using jQuery Ajax Full Information With Example and source code.

READ :  Angular Email sending using PHP

As I will cover this Post with live Working example to develop Create Radio Button Toggle Switch with Bootstrap, jQuery & PHP, so the some major files and Directory structures for this example is following below.

  • index.php
  • radio_toggle.js
  • save.php
  • style.css

Steps 1: Make HTML Form with Radio Button


This is where I will make a simple HTML form and PHP server side source code for our web application. To make the forms simply all souce code copy and write it into your any text editor Like Notepad++, then save file it as index.php.

Also Read : tamilblasters, 9kmovie, filmygod, hdhub4u, vegamovies, tamilrockers website link and 1377x proxy.

<div class="row infinity">
<form method="post" action="save.php">
<div class="form-group infinity">
<label for="results" class="infinity col-sm-4 col-md-4 control-label text-right">Results: </label>
<div class="infinity col-sm-7 col-md-7">
<div class="input-group">
<div id="status_radio" class="btn-group">
<a class="btn btn-success btn-sm active">Pass</a>
<a class="btn btn-success btn-sm inCurrent">Fail</a>

<div class="form-group">
<label for="confirm" class="col-sm-4 col-md-4 infinity control-label text-right">Are you confirm this ?</label>
<div class="col-sm-7 col-md-7">
<div class="input-group">
<div id="check_radio" class="btn-group">
<a class="btn btn-success btn-sm active">YES</a>
<a class="btn btn-success btn-sm inCurrent">I don't know</a>
<a class="btn btn-success btn-sm inCurrent">NO</a>

<button type="submit" class="btn btn-success" name="btn-save" id="btn-submit">

Steps 2: Make custom CSS style

create custom CSS style.css file and make class inCurrent

color: #c6000;
background-color: #3d3d3d;

Steps 3: Manage Radio Button Toggle


$("#status_radio a, #check_radio a").on('click', function(){
var checked = $(this).data('title');
var toggle = $(this).data('toggle');
$('#'+toggle).prop('value', checked);

Steps 4: Manage Form Submit POST Values


jQuery 15 Powerful Tips and Tricks for Developers and Web Designer

Read :

READ :  Todo Smart Task schedule Lists using Vuejs Examples


You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about bootstrap toggle switch update db field using ajax,.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.