download html div into pdf using jsPDF

download html div  into pdf using jsPDF ADD THIS BETWEEN HEAD <script src=”https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.2/jspdf.debug.js”></script> <script> var pdfdoc = new jsPDF(); var specialElementHandlers = { ‘#ignoreContent’: function (element, renderer) { return true; } }; $(document).ready(function(){ $(“#gpdf”).click(function(){ pdfdoc.fromHTML($(‘#printableArea’).html(), 10, 10, { ‘width’: 110, ‘elementHandlers’: specialElementHandlers }); pdfdoc.save(‘gemscerti.pdf’); }); }); </script> Html Code <button id=”gpdf” style=”display: none;”>Generate PDF</button> <div id=”printableArea”> <div id=”theme-page” style=”display: none;”>             <div class=”table-content col-6″>         <ul>         <li id=”report_no”>Report No : 15074</li>         <li id=”date”>Date :…

Read More

Multiple Image Upload and Resize Image In CodeIgniter

Multiple Image Upload and Resize Image In CodeIgniter First you must load “image_lib” library of CI. This is a controller in CI public function imageUpload()     {         $data = array();         if ($this->input->post(‘submit’))         {             if ($_FILES[“sc_name”][“name”])             {                 $path = ‘./upload_image’;                 if (!is_dir($path))                …

Read More

How to resolve: Warning: ini_set() has been disabled for security reasons Error

How to resolve: Warning: ini_set() has been disabled for security reasons Error Step 1. In the root folder of your website, create a new file and save it as “php.ini” on your FTP Filemanager Step 2. Edit php.ini, copy and paste the code below: safe_mode = Offdisplay_errors = Offmemory_limit = 64Mdisable_functions = Step 3: Save and reload website to see if it’s working.

Read More

Address in PHP variable, Google Maps embedding without Javascript?

Address in PHP variable, Google Maps embedding without Javascript? Solution 1: <iframe width=”640″ height=”480″ frameborder=”0″ scrolling=”no” marginheight=”0″ marginwidth=”0″ src=”https://maps.google.it/maps?q=<?php echo $yourAddress; ?>&output=embed”></iframe> Solution 2: <head> … <script src=”https://maps.googleapis.com/maps/api/js?sensor=false”></script> <script>   var geocoder;   var map;   function initialize() {     geocoder = new google.maps.Geocoder();     var mapOptions = {       zoom: 12, //Change the Zoom level to suit your needs       mapTypeId: google.maps.MapTypeId.ROADMAP     }     //map_canvas is just a <div> on the page with the id=”map_canvas”     map = new…

Read More

Configured save path ” is not a directory, doesn’t exist or cannot be created.

Configured save path ” is not a directory, doesn’t exist or cannot be created. Problem: when I want to set session data in codeigniter 3 it says error like: A PHP Error was encountered Severity: Warning Message: mkdir(): Invalid path Filename: drivers/Session_files_driver.php Line Number: 117 Backtrace: File: C:xampphtdocsci-testapplicationcontrollerslogin.php Line: 7 Function: __construct File: C:xampphtdocsci-testindex.php Line: 292 Function: require_once Solution: $config[‘sess_driver’] = ‘database’; $config[‘sess_cookie_name’] = ‘ci_session’; $config[‘sess_expiration’] = 7200; $config[‘sess_save_path’] = ‘ci_sessions’; $config[‘sess_match_ip’] = FALSE; $config[‘sess_time_to_update’] = 300; $config[‘sess_regenerate_destroy’] = FALSE; Or $config[‘sess_driver’] = ‘database’; $config[‘sess_cookie_name’] = ‘ci_session’; $config[‘sess_expiration’] = 7200;…

Read More

No input file specified code igniter

No input file specified code igniter Error: Hi I am a beginner in Codeigniter and I saw a CI tutorial and was just trying to do a simple thing. I downloaded the CI and added this file to controller directory, but it won’t work. <?php class site extends CI_Controller {     public function index()     {         echo “Hello World”;     }     function dosomething()     {         echo “Do Something”;     }    }     ?> When…

Read More
DynamicDependentSelectBoxusingjQuery2CAjaxandPHP php 

Dynamic Dependent Select Box using jQuery, Ajax and PHP

Dynamic Dependent Select Box using jQuery, Ajax and PHP Database & Tables Create a database, like location_db. location_db consists of three tables countries, states, and cities. statestable has a relation with countries table and cities table has a relation with states table. countries Table:This table contains all the countries data. countries table SQL would like below. CREATE TABLE IF NOT EXISTS `countries` ( `country_id` int(11) NOT NULL, `country_name` varchar(30) CHARACTER SET utf8 NOT NULL, `status` tinyint(1) NOT NULL DEFAULT ‘1’ COMMENT ‘0:Blocked, 1:Active’ ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; states Table:This table contains all the states data and country_id FOREIGN KEY. states table SQL would like below. CREATE TABLE IF NOT EXISTS…

Read More