View all courses
This Course is designed for the aspiring Web Designers and Developers with a need to understand the HTML in enough detail along with its simple overview, and practical examples.
Read more
CSS is used to control the style of a web document in a simple and easy way.This tutorial will help both students as well as professionals who want to make their websites.
JavaScript is a lightweight, interpreted programming language. It is designed for creating network-centric applications. It is complimentary to and integrated with Java.
This tutorial is designed for software programmers who wants to learn the basics of jQuery and its programming concepts in simple and easy ways. This tutorial will give you enough understanding on components of jQuery with suitable examples.
AJAX, is a web development technique for creating interactive web applications. If you know JavaScript, HTML, CSS, and XML, then you need to spend just one hour to start with AJAX.
HTML5 is the latest and most enhanced version of HTML.Technically, HTML is not a programming language, but rather a mark up language.This tutorial has been designed for beginners in HTML5 providing the basic to advanced concepts of the subject.
PHP (Hypertext Preprocessor), it is extensively used by developers for programming and development. PHP has lots of benefits and easy to learn so it is the first choice of developers and programmer.
Many PHP programming courses cover the basics or a specific concept. Our Advanced PHP Development course gives you the concepts, features, tools, and practical advice to use them together to build performant, secure, scalable, and reliable web applications.
In this tutorial we will provide you with detailed instructions on how to use WordPress to create and manage your site. WordPress can be used for both simple and complex websites. In our WordPress tutorial we have tried to cover all the basics and few advanced topics.
This tutorial has been prepared for developers who would like to learn the art of developing websites using CodeIgniter. It provides a complete understanding of this framework.
Zend Framework 1 is an open source framework for developing web applications and services using PHP 5.3+. Zend Framework 1 uses 100% object-oriented code and utilises most of the new features of PHP 5.3.
Zend Framework 2 is an open source Module based framework for developing web applications and services using PHP 5.5+. Zend Framework 1 uses 100% object-oriented code and utilises most of the new features of PHP 5.5
The Language Which does not need any prior knowledge of Programming and Easy to learn .Python is Object-oriented ,interpreted and Server side Scripting language .
In Advance concept After learning Core Python We will use Python to create Desktop Application, Web Application, Sockets Programming , Multithread Programming. Since its An Open source Language its free of Cost
Ruby is server side, dynamic, reflective, object-oriented, general-purpose programming language. Ruby is "an interpreted scripting language for quick and easy object-oriented programming"
Ruby on Rails, or simply Rails, is a web application frameworkwritten in Ruby under the MIT License. Rails is a model–view–controller (MVC) framework, providing default structures for a database, a web service, and web pages.
If you have any confusion then you can ask our experts.Our experts will guide you properly.
We are looking you if you are looking guidance for web design and development. Apply online.
Contact us
step - 1 <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/js/bootstrap-datepicker.min.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/css/bootstrap-datepicker3.css"/> <style> .form-control{float: left;width: 70%;} .btn{float: left;margin-left: 5px;} /* For Loading Overlay by CodexWorld */ .container{position: relative;} .loading-overlay{ position: absolute; left: 0; top: 0; right: 0; bottom: 0; z-index: 2; background: rgba(255,255,255,0.7); } .overlay-content { position: absolute; transform: translateY(-50%); -webkit-transform: translateY(-50%); -ms-transform: translateY(-50%); top: 50%; left: 0; right: 0; text-align: center; color: #555; } </style> <div class="container"> <h2>Search filter using jquery php</h2> <div class="bootstrap-iso"> <div class="container-fluid"> <form method="post"> <div class="form-group pull-left"> <input type="text" class="search form-control" id="searchInput" placeholder="By Name or Email"> <input class="form-control" id="date" name="date" placeholder="MM/DD/YYY" type="text"/> <input type="button" class="btn btn-primary" value="Search" onclick="getUsers('search',$('#searchInput').val())"/> </div> </form> </div> </div> <div class="form-group pull-right"> <select class="form-control" onchange="getUsers('sort',this.value)"> <option value="">Sort By</option> <option value="new">Newest</option> <option value="asc">Ascending</option> <option value="desc">Descending</option> <option value="active">Active</option> <option value="inactive">Inactive</option> </select> </div> <div class="loading-overlay" style="display: none;"><div class="overlay-content">Loading.....</div></div> <table class="table table-striped"> <thead> <tr> <th>Name</th> <th>Email</th> <th>Phone</th> <th>Created</th> <th>Status</th> </tr> </thead> <tbody id="userData"> <?php include 'DB.php'; $db = new DB(); $users = $db->getRows('users_new',array('order_by'=>'id DESC')); if(!empty($users)){ $count = 0; foreach($users as $user){ $count++; ?> <tr> <td><?php echo $user['name']; ?></td> <td><?php echo $user['email']; ?></td> <td><?php echo $user['phone']; ?></td> <td><?php echo $user['created']; ?></td> <td><?php echo ($user['status'] == 1)?'Active':'Inactive'; ?></td> </tr> <?php } }else{ ?> <tr><td colspan="5">No user(s) found...</td></tr> <?php } ?> </tbody> </table> </div> <script> function getUsers(type,val){ var start_date = $("#date").val(); $.ajax({ type: 'POST', url: 'getData.php', data: 'type='+type+'&val='+val+'&start_date='+start_date, beforeSend:function(html){ $('.loading-overlay').show(); }, success:function(html){ $('.loading-overlay').hide(); $('#userData').html(html); } }); } </script> <script> $(document).ready(function(){ var date_input=$('input[name="date"]'); //our date input has the name "date" var container=$('.bootstrap-iso form').length>0 ? $('.bootstrap-iso form').parent() : "body"; var options={ format: 'yyyy-mm-dd', container: container, todayHighlight: true, autoclose: true, }; date_input.datepicker(options); }) </script> Step -2 <?php include 'DB.php'; $db = new DB(); $tblName = 'users_new'; $conditions = array(); if(!empty($_POST['type']) && !empty($_POST['val'])){ if($_POST['type'] == 'search'){ $conditions['search'] = array('name'=>$_POST['val'],'email'=>$_POST['val'],'created'=>$_POST['start_date']); $conditions['order_by'] = 'id DESC'; }elseif($_POST['type'] == 'sort'){ $sortVal = $_POST['val']; $sortArr = array( 'new' => array( 'order_by' => 'created DESC' ), 'asc'=>array( 'order_by'=>'name ASC' ), 'desc'=>array( 'order_by'=>'name DESC' ), 'active'=>array( 'where'=>array('status'=>'1') ), 'inactive'=>array( 'where'=>array('status'=>'0') ) ); $sortKey = key($sortArr[$sortVal]); $conditions[$sortKey] = $sortArr[$sortVal][$sortKey]; } }else{ $conditions['order_by'] = 'id DESC'; } $users = $db->getRows($tblName,$conditions); if(!empty($users)){ $count = 0; foreach($users as $user): $count++; echo '<tr>'; echo '<td>'.$user['name'].'</td>'; echo '<td>'.$user['email'].'</td>'; echo '<td>'.$user['phone'].'</td>'; echo '<td>'.$user['created'].'</td>'; $status = ($user['status'] == 1)?'Active':'Inactive'; echo '<td>'.$status.'</td>'; echo '</tr>'; endforeach; }else{ echo '<tr><td colspan="5">No user(s) found...</td></tr>'; } exit; step - 3 <?php /* * DB Class * This class is used for database related (connect and fetch) operations * @author CodexWorld.com * @url http://www.codexworld.com * @license http://www.codexworld.com/license */ class DB{ private $dbHost = "localhost"; private $dbUsername = "root"; private $dbPassword = ""; private $dbName = "ajax"; public function __construct(){ if(!isset($this->db)){ // Connect to the database $conn = new mysqli($this->dbHost, $this->dbUsername, $this->dbPassword, $this->dbName); if($conn->connect_error){ die("Failed to connect with MySQL: " . $conn->connect_error); }else{ $this->db = $conn; } } } /* * Returns rows from the database based on the conditions * @param string name of the table * @param array select, where, search, order_by, limit and return_type conditions */ public function getRows($table,$conditions = array()){ $sql = 'SELECT '; $sql .= array_key_exists("select",$conditions)?$conditions['select']:'*'; $sql .= ' FROM '.$table; //echo $sql; if(array_key_exists("where",$conditions)){ $sql .= ' WHERE '; $i = 0; foreach($conditions['where'] as $key => $value){ $pre = ($i > 0)?' AND ':''; $sql .= $pre.$key." = '".$value."'"; $i++; } } if(array_key_exists("search",$conditions)){ $sql .= (strpos($sql, 'WHERE') !== false)?'':' WHERE '; $i = 0; foreach($conditions['search'] as $key => $value){ $pre = ($i > 0)?' AND ':''; $sql .= $pre.$key." LIKE '%".$value."%'"; $i++; } } //echo $sql; if(array_key_exists("order_by",$conditions)){ $sql .= ' ORDER BY '.$conditions['order_by']; } if(array_key_exists("start",$conditions) && array_key_exists("limit",$conditions)){ $sql .= ' LIMIT '.$conditions['start'].','.$conditions['limit']; }elseif(!array_key_exists("start",$conditions) && array_key_exists("limit",$conditions)){ $sql .= ' LIMIT '.$conditions['limit']; } //echo $sql; $result = $this->db->query($sql); if(array_key_exists("return_type",$conditions) && $conditions['return_type'] != 'all'){ switch($conditions['return_type']){ case 'count': $data = $result->num_rows; break; case 'single': $data = $result->fetch_assoc(); break; default: $data = ''; } }else{ if($result->num_rows > 0){ while($row = $result->fetch_assoc()){ $data[] = $row; } } } return !empty($data)?$data:false; } }
< pagination php mysql jquery How to display data from database in JSON format using Ajax and PHP >
{{questionlistdata.blog_question_description}}
{{answer.blog_answer_description }}