Skip to content

Instantly share code, notes, and snippets.

View YuvrajKhavad's full-sized avatar
👨‍💻
Simplifying Work at Z Index

Yuvraj Khavad YuvrajKhavad

👨‍💻
Simplifying Work at Z Index
View GitHub Profile
@YuvrajKhavad
YuvrajKhavad / sql_query.sql
Last active January 1, 2019 14:01
SQL query to create a table
CREATE TABLE `employee` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`fist_name` varchar(255) NOT NULL,
`last_name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`gender` TINYINT NOT NULL,
`created_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
@YuvrajKhavad
YuvrajKhavad / database.php
Last active January 1, 2019 14:11
Config file for database connection with application
<?php
$active_group = 'default';
$query_builder = TRUE;
$db['default'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'root',
'password' => '',
'database' => 'ci_crud_operations',
<div class="col-lg-3 col-md-6 mb-4">
<div class="card">
<img class="card-img-top" src="http://placehold.it/500x325" alt="">
<div class="card-body">
<h4 class="card-title">Card title</h4>
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sapiente esse necessitatibus
neque.</p>
</div>
<div class="card-footer">
<a href="#" class="btn btn-primary">Find Out More!</a>
$autoload['helper'] = array('url');
@YuvrajKhavad
YuvrajKhavad / footer.php
Last active January 1, 2019 18:27
Footer view of web application
@YuvrajKhavad
YuvrajKhavad / Employee.php
Last active January 2, 2019 09:07
Controllar file of application.
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Employee extends CI_Controller
{
// This method will call when Employee controller called
public function index()
{
// Load header view, file location application\views\includes\header.php
$this->load->view('includes/header');
@YuvrajKhavad
YuvrajKhavad / employee_list.php
Last active January 2, 2019 09:37
List of Employee in table
<h2>All Employee</h2>
<a class="btn btn-primary" href="#" role="button">New Employee</a>
<table class="table table-striped">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">First Name</th>
<th scope="col">Last Name</th>
@YuvrajKhavad
YuvrajKhavad / header.php
Last active January 2, 2019 10:31
header section for applications
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>CRUD Operations Using CI - Yuvraj Khavad</title>
@YuvrajKhavad
YuvrajKhavad / google_captach_contact_form_7_in_french.php
Last active January 10, 2020 11:47
Google captcha in french with contact form 7 WordPress, Just add this code on function.php
add_action( 'wpcf7_enqueue_scripts', 'custom_recaptcha_enqueue_scripts', 11 );
function custom_recaptcha_enqueue_scripts() {
wp_deregister_script( 'google-recaptcha' );
$url = 'https://www.google.com/recaptcha/api.js';
$url = add_query_arg( array(
'onload' => 'recaptchaCallback',
'render' => 'explicit',
'hl' => 'fr-CA' ), $url );
@YuvrajKhavad
YuvrajKhavad / config.php
Last active September 19, 2020 06:48
Base URL of application.
$config['base_url'] = 'http://localhost/projects/codeigniter-crud-operations/';