Skip to main content

Posts

Steps of Backup WordPress site Setup in Local

 WordPress Setup Process  1. Import DB file in MySQL  2. Change database details in the wp-config.php file. 3. Goto DB and find wp-option table and change URL  4. Go to the admin page of WordPress and to setting>permalinks and change links and save it.  Now try to open the site. 
Recent posts

PHP SPARESHEET CODE

PHP SPARESHEET CODE <?php namespace App\Http\Controllers; require 'vendor/autoload.php'; use DB; use File; use Session; use Helper; use DateTime; use DateInterval; use DatePeriod; use App\AdminAuth; use App\SalaryLog; use App\TimeLog; use App\Project; use Illuminate\Support\Str; use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\Support\Facades\URL; use Illuminate\Support\Facades\Storage; use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\IOFactory; use PhpOffice\PhpSpreadsheet\Writer\Xlsx; use PhpOffice\PhpSpreadsheet\Style\NumberFormat; \PhpOffice\PhpSpreadsheet\Cell\Cell::setValueBinder( new \PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder() ); class ExcelController extends Controller {     public function index()     {         return view('Report.report');     }     public function create_report()     {         $row_cnt=2;       ...

Bigcommerce GraphQL API Execute code

 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script type="text/javascript"> $(function(){     $( ".cart-item-name__label" ).each(function() {          product_id=$(this).data('prodid'); //graphQL code           var query = `query SeveralProductsByID {                   site {                     products(entityIds: [${product_id}]) {                       edges {                         node {                           name                           description                 ...

Print Values of New FormData()

Print Values of New FormData()  //js code for print FromData() values var formData = new FormData ( ) ; formData. append ( 'key_one' , 'First value' ) ; formData. append ( 'key_two' , 'Second value' ) ; formData. append ( 'key_three' , 'Thrid value' ) ; // Log the key/value pairs for ( var pair of formData. entries ( ) ) { console . log ( pair [ 0 ] + ' - ' + pair [ 1 ] ) ; } output : key_one - First value key_two - Second value key_three - Thrid value full link : https://codepulse.blog/howto-display-formdata-values/
 JQ Form Data For Ajax  function insert_data(form) { var formData = new FormData(form); // create form data formData.append("faq_question", CKEDITOR.instances.faq_question.getData()); // append form data formData.append("faq_answer", CKEDITOR.instances.faq_answer.getData()); $.ajax({ url: "<?php echo base_url('topadmin/faq/add_data');?>", type: "POST", data: formData, // cache: false, contentType: false, //contentType: 'multipart/form-data', processData: false, success: function(data) { var response = JSON.parse(data); if (response.status == true) {     alert("success"); } else { alert("Fail"); } } }); return false; }
PHP Export As Excel Code <?php date_default_timezone_set("Asia/Kolkata");             $conn = mysqli_connect('localhost', 'nspsjadugora_db', 'TdUE8FLwiC','nspsjadugora_db');             $sqlQuery = "select * from tbl_student";             $resultSet = mysqli_query($conn, $sqlQuery) or die("database error:". mysqli_error($conn));             $studentData = array();             while( $student = mysqli_fetch_assoc($resultSet)) {                 $studentData[] = $student;                 }             $fileName = "webdamn_export_".date('Ymd') . ".xls";                      header("Content-Type: application/vnd.ms-excel");             header("Conten...