Skip to main content

Posts

Showing posts from April, 2021

Php Datatables Delete Multiple Selected Rows Tutorial

Hi Dev, In this blog, I will explain you how to delete multiple selected records useing datatables in php. We will show delete multiple selected records in php. you can easy delete multiple selected records useing datatables in php. we will show datatables delete multiple selected rows example in php. I will give fulll example of php delete multiple selected records in datatables. Step 1: Cretae Table In this step, i will create table in mysql database. CREATE TABLE `employee` ( `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, `emp_name` varchar(80) NOT NULL, `salary` varchar(20) NOT NULL, `gender` varchar(10) NOT NULL, `city` varchar(80) NOT NULL, `email` varchar(80) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; Step 1:Configuration In this step, I will create php to mysql datatables configuration. config.php <?php $host = "localhost"; /* Host name */ $user = "root"; /* User */ $password = "root"; /* Password */ $dbname = "php_tu...

Jquery Set Custom Data Attribute Value Example

Hii guys, In this artical, we will learn how to get custom attribute value in jquery and how to set custom attribute value in jquery. we will use attr() and data() for getting custom attribute value and set custom attribute value in js. We can easily set data attribute value in jquery, also you can do it same thing with custom attribute value in jquery. Example 1: First Example Using jquery data() function <!DOCTYPE html> <html> <head> <title>Jquery Set custom data attribute value</title> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> </head> <body> <div id="example1">Click Here:</div><br> <button class="set-attr">Set Attribute</button> <script type="text/javascript"> $(".set-attr").click(function(){ $("#example1").data('my-name', 'ni...

Laravel 8 Multiple Image Upload Example

Hi Guys, In this tutorial, I will learn you how to create multiple image upload in laravel 8. We will show example of laravel 8 multiple image upload.Here you will learn laravel 8 multiple images upload. We will look at example of multiple image upload laravel 8. this example will help you laravel 8 multiple image upload with preview. Alright, let’s dive into the steps. I will create simple multiple image upload in laravel 8. So you basically use this code on your laravel 8 application.I are going from starch so, we will upload multiple file and store on server then after we will store database too. so in this example we will create "files" table using laravel migration and write code for route, controller and view step by step. Here, I will give you full example for laravel 8 multiple image upload as bellow. Step-1:Download Laravel 8 Fresh New Setup First, we need to download the laravel fresh setup. Use the below command and download fresh new laravel setup : composer ...

PHP Remove Extension From a Filename with Tutorial

Hi guys, In this blog, i will explain how to remove extension from a filename.If you’ve got a filename that you need to remove the extension from with PHP.We will show remove extension from a filename. i will using pathinfo(), basename(),etc different function to remove file name extension. Here following the remove extension from a filename exmaple. Solution 1: Using pathinfo() Now in this exmaple, The pathinfo() function returns an array containing the directory name, basename, extension and filename.Alternatively, you can pass it one of the PATHINFO_ constants and just return that part of the full filename. $fileName = 'itwebtutsFileName.html'; $withOutExtension = pathinfo($fileName, PATHINFO_FILENAME); output itwebtutsFileName Solution 2: Using basename() Here in this exmaple, If the extension is known and is the same for the all the filenames, you can pass the second optional parameter to basename() to tell it to strip that extension from the filename. $fileName = ...

PHP Pagination with MySQL and Bootstrap Tutorial

Hi Guys, In this blog, I will learn you PHP pagination PHP is mostly used to store and display data from a database. Pagination can be done with ajax, but here this is done with non-ajax. In this tutorial, we will learn the pagination in PHP with MySQL. Let's take a brief review about pagination with an example - It is possible that a SQL SELECT query may returns millions of records back. It is not a good idea to display all records on a single page. A large list of records on a single page may take so much time to load the page and also consume time to find specific data. This may cause (leads to) the confusion in user's mind. Therefore, divide these records over several pages according to the user requirement. So, what can we do to distribute these large number of records in number of pages? The method of distributing a single list into multiple pages is known as Pagination. Paging refers to showing your query result on multiple pages instead of a single page. What is...

Laravel 8 Install in Ubuntu Tutorial

Hi Guys Today,I will explain you how to install laravel 8 on ubuntu. we will show step by step install laravel 8 on ubuntu 16.04 18.04 and 20.00 .I will first install composer on upbantu. Here, I will give you full example for laravel 8 install in ubuntu example as bellow. Step 1: Install Composer In this step,We will download the composer using the below command. sudo apt-get update sudo apt-get install curl sudo curl -s https://getcomposer.org/installer | php Now we move the composer.phar file into the bin folder and set the permission for all users. sudo mv composer.phar /usr/local/bin/composer chmod +x /usr/local/bin/composer Step 2: Install Laravel 8 Now this step, I will move on root directory “/var/www/html” and .download and install fresh laravel. cd /var/www/html composer create-project laravel/laravel blog --prefer-dist "8.*" After installation laravel 8, we need to permission for the new directory. so we will set permission using the below command. sudo chown -R...

Laravel 8 Send Email Example Tutorial

Hi Guys, In this blog,I will learn you how to send example in laravel 8.we will show step by step laravel 8 send email example. you can easliy create laravel 8 send email example. Laravel 8 provide several way to send email. You can also use core PHP method for send mail and you can also use some email service providers such as sendmail, smtp, mandrill, mailgun, mail, gmail etc. So you can choese any one and set configration. Laravel 8 provide Mail facade for mail send that have sevaral method for send email.In this example i going to show you how to send emails from gmail account example. This example is very simple you can use as requirement easily. It is very simple to configration with gmail account so first open your .env file and add bellow gmail configration. Here, I will give you full example for send email using Laravel 8 as bellow. Step 1: .env MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 MAIL_USERNAME=dharmiktank128@gmail.com MAIL_PASSWORD=mypassword MAIL_ENC...

Laravel 8 Generate QR Code Example

Hi Guys, Today,I will learn you how create QR Code in laravel 8 we will show QR Code generator example in laravel 8.I will generator QR Code useing simplesoftwareio/simple-qrcode package in laravel 8. laravel 8 QR Code generator example. in this tutorial, i would like to show you how to generate or create QR Code in laravel 8 using simplesoftwareio/simple-qrcode package. Using this simplesoftwareio/simple-qrcode package, you can generate simple qr code, qr code, image qr code, text qr code in laravel 8 app. As well as, you can send this qr codes in mail and text message. In this tutorial, i will use simplesoftwareio/simple-qrcode package to generate simple, text, numeric and image qr code in laravel 8 app. Step 1 : Install Laravel 8 Application we are going from scratch, So we require to get fresh Laravel application using bellow command, So open your terminal OR command prompt and run bellow command: composer create-project --prefer-dist laravel/laravel blog Step 2 :Database C...

JQuery Disable Button on Click To Prevent Multiple Form Submits Example

Hii Dev, In this example, i will give you simple example in jQuery disable button on click to prevent multiple form submits. we will lean how to disable button on click to prevent multiple form submits in jquery. we can stop duplicate form submission using jquery. we can easily disabled button on click event in jquery for prevent duplicate form submit. when you click on submit button than it should be disabled so it's click again. I written example for that, you can use bellow php file. you can see bellow full code. You can also check this small jquery code and full code. Jquery code $(document).ready(function () { $("#formABC").submit(function (e) { //stop submitting the form to see the disabled button effect e.preventDefault(); //disable the submit button $("#btnSubmit").attr("disabled", true); return true; }); }); Here is a full example, you can see. Full Example <!DOCTYPE html> <...

Jquery Disabled Select Element Tutorial - ItWebtuts

Hi Dev, In this artical, i will give you disable select using jQuery.If You are looking for a simple way to disable select for any html element then here you will find the best solution to disable select on page. There are some reasons why you will select text disable. Example 1 It may be you want to show your own menu html page select text disable on a , useing the jQuery-ui bind() method. <!DOCTYPE html> <html> <head> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> </head> <body> <h3>Select text disable on this page.</h3> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in volupt...

PHP Upload File Using Ckeditor Example - Itwebtuts

Hii Developer, In this example,I am going to show you How to do upload custom file with CKEDITOR in PHP application. In this tutorial i explain step by step example code of How to image upload with CKEDITOR php. You can see simple example of php ckeditor custom image upload using browse button. Here i give you full example of How to How to do custom file upload with in CKEDITOR step by step like create one file in this file we are integrate CKEDITO and secound another file which we are created for uploadin custom file. Following The Step: 1)create one index.php file 2)create cstom file uploading file Step:1 Create one index.php file Now we have download CKEDITOR in our local PC. then we are create our index.php file and this file we are use CKEDITOR <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="robots" content="noindex, nofollow"> <title>Ckeditor File Upload</title> ...

Laravel Get All Columns From Table Example - ItWebtuts

Hi dev, In this example,i will get all columns of a table in laravel . we are pick up all columns of model in laravel. it can get all column names of a table in php laravel. So sometime you may need to get table name from controller into your laravel application and you can easily get table name by using getTable() method.You will see two are lots of method available with Laravel get all columns from table.your laravel application and you can easily get all columns from table using getTable() method. I can blow you can easily get all columns from table in laravel this example. Example:1 Here In this exmaple laravel get all columns from table using a schema builder to a getColumnListing method /** * Show the application dashboard. * * @return \Illuminate\Contracts\Support\Renderable */ public function index() { $user= new User; $table = $user->getTable(); $columns = \Schema::getColumnListing($table); dd($columns); } Output: array:8 [ 0 => ...

Jquery Search Text From Page With Next And Previous Button Example

Hi Guys, Today, I will learn you how to search text from page with next and previous button useing jquery.we will show example of search text. you can easliy search text from page with next and previous button useing jquery.i will use highlight js to make jquery search text from page with next and previous button. Here, I will give you full example for simply search text from page with next and previous button using jquery as bellow. Example <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title> - jsFiddle demo</title> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.js"></script> <script type='text/javascript' src='https://johannburkard.de/resources/Johann/jquery.highlight-4.js'></script> <style type='text/css'> body { font-family:Calibri,Tahoma,Verdana; border:2px solid #000; padding:...

Laravel One to Many Eloquent Relationship Tutorial

Hi Dev, In this tutorial, I Will explain you how to create laravel one to Many eloquent relationship. We will create one to many relationship in laravel. We will learn how we can create migration with foreign key schema, retrieve records, insert new records, update records etc. I will show you laravel hasMany relationship example. We will create "employee" and "salary" table.both table are connected with each other, I will create one to many relationship with each other by using laravel Eloquent Model, We will first create database migration, then model, retrieve records and then how to create records too.One to Many Relationship use "hasMany()" and "belongsTo()" for relation. Here, I will give you full example for laravel one to many eloquent relationship as bellow. Step:1 Create Migration In this example, we will need two tables in our database employee and salary.I will start to create the model and migrations, then we will define the on...

PHP Create,Access,and Destroy Cookies Tutorial

Hi Guys, In this blog,I will explain you how to create,access,and destroy cookies in php a cookie is a small file with the maximum size of 4KB that the web server stores on the client computer.They are typically used to keeping track of information such as a username that the site can retrieve to personalize the page when the utilizer visits the website next time.A cookie can only be read from the domain that it has been issued from.Cookies are conventionally set in an HTTP header but JavaScript can withal set a cookie directly on a browser. Tip: Each time the browser requests a page to the server, all the data in the cookie is automatically sent to the server within the request. Setting a Cookie in PHP The setcookie() function is utilized to set a cookie in PHP. Ascertain you call the setcookie() function before any output engendered by your script otherwise cookie will not set. The basic syntax of this function can be given with: Syntax: setcookie(name, value, expire, path, domain,...