Category : PHP


PHP - How to implement Google new reCAPTCHA Code Example with Demo?

We have to use Google captcha code on our registration form, contact form etc because captcha code prevent spams, bots etc. Google provide us to prevent bots sending form requests that way we can protect our site. So, Today i am going to give you very simple example of how to add google reCAPTCHA code in Core PHP from scratch. In this example you have to generate our own API Site Key and Secret from google account. But If you don't know how to generate then no worry, here is the step to generate API Key. we will create two files one "index.php" file for generate view for layout using bootstra.....

By Hardik Savani | August 28, 2016 | | 5420 Viewer | Category : PHP
READ MORE

How to implement infinite ajax scroll pagination in Laravel 5?

We always want to see auto load more data on page scroll on your home page or other pages for posts, news, listing etc like on facebook, twitter, linkedin etc. If you implemented infinite scroll on your php application then you don't require to give pagination and also not require to page refresh every time when page scroll. So, Today, i going to give you simple example of infinite scroll using jquery ajax on page scroll in laravel application from scratch. I use jquery scroll event for page scroll. this example is pretty simple, you can customize simply for your development. You have to jus.....

By Hardik Savani | August 23, 2016 | | 25936 Viewer | Category : PHP
READ MORE

PHP - How to remove duplicate values from multidimensional array?

Sometimes, we require to remove duplicates value from multidimensional array in our PHP framework php like laravel, codeigniter, zend etc. Today, In this example i going to give you example of get unique values from multidimensional array that way duplicates will be delete. In this example i have simple multidimensional array with duplicates values array and i will perform to get only unique values from multidimensional. It is possible by core PHP array_map() and array_unique(). It helps to remove duplicates values from multidimensional array. So, first you can see bellow my multidimensional.....

By Hardik Savani | August 20, 2016 | | 1615 Viewer | Category : PHP
READ MORE

Simple Add remove input fields dynamically using jquery with Bootstrap

In this tutorial, I am going to show you how to add remove input fields dynamically in your form using jquery. In this simple example, i give you to add multiple input fields with remove button that way you can remove field if you don't require. In this example i use bootstrap also because layout become pretty good. In this example, Simply i added two click event of jquery as listed bellow: <strong>1.add-more Class:</strong> On ".add-more" class that way we can write jquery append code. <strong>2.remove Class:</strong> On ".remove" class that way we can remove input field. I also added "copy.....

By Hardik Savani | August 19, 2016 | | 25078 Viewer | Category : PHP
READ MORE

PHP - jquery ajax crop image before upload using croppie plugin

we mostly need to crop image before upload and as specially when we save image for user profile or etc. In this post i tell you how to crop image and save using jquery ajax. In this example i use croppie plugin that provide to crop image with zoom and etc. croppie.js plugin is very professional that way we can easily use for crop profile image. Bellow example through you can implement easily with php and jquery. It is pretty simple example for upload crop and save image php using croppie.js plugin. You have to create two file and one upload directory for store crop image like as bellow: <s.....

By Hardik Savani | August 6, 2016 | | 33668 Viewer | Category : PHP
READ MORE

Jquery select2 ajax autocomplete example with demo in PHP

Jquery select2 plugin is a very famous jquery plugin, using select2 plugin we can do several thing like select box with search, select option with check box, ajax auto-complete etc. We normally require to do autocomplete task with select box when we have large amount of data like products, items, category, tag, user etc. so we can't load all then data at time and it's hard to find that item from several records. So select2 plugin provides us with select box with search and Ajax dynamically auto complete that way page will never load more and it will work fine. In this example, I have two fil.....

By Hardik Savani | August 5, 2016 | | 44974 Viewer | Category : PHP
READ MORE

Solved - opencart this merchant is not enabled for auth/settle

When i was learning opencart and i was trying to setup paypal integration with sand box then i fetch one error. Every thing was working proper but when i try to pay money i found error like as bellow: <pre> this merchant is not enabled for auth/settle </pre> I did also try to change my buyer account and try but same, I also did try with different way but same result. At last i found that i used <strong class="path">Personal</strong> account on opencart module setting, we require to use <strong class="path">Business</strong> Account. So when you create new user then select Business in account.....

By Hardik Savani | July 25, 2016 | | 859 Viewer | Category : PHP
READ MORE

How to get last 2 days records from table using Mysql Query?

We may sometimes require to get few days ago records from table like last 2 days, last 3 days, last 10 days or last 15 days etc. Most of developer choose other logic but we can easily get using mysql query(using CURDATE and INTERVAL). In this example mysql query i have one table "elements" and columns are id, title, description, created_at(timestamps) and update_at, Now we will get all records of last 2 days.so you can fetch fields value using CURDATE and INTERVAL of mysql. In following example you can see how to select data of last two days. <strong>Query:</strong> <pre> SELECT * FROM `elem.....

By Hardik Savani | July 22, 2016 | | 1251 Viewer | Category : PHP
READ MORE

Bootstrap form validation example with demo using validator.js plugin

We always need to add validation on form like registration form, contact form, login form etc. we always prefer to give validation error after page refresh but you can give validation without page refresh. If you use bootstrap then you can use easily validator.js plugin. validator.js plugin gives client side validation without page refresh. We can use simply. validator.js plugin we can add validation in our PHP project, or any framework like laravel framework, codeigniter framework, symphony framework etc. In this example i give you how can you give validation for require field, email, minle.....

By Hardik Savani | July 20, 2016 | | 34455 Viewer | Category : PHP
READ MORE

How to remove duplicate values from Array in PHP?

It is pretty simple to delete duplicate values from PHP Array. But sometimes we confuse for how can we remove. But PHP provide pre-define function array_unique that can help to remove duplicate values from Array. array_unique() through we can get only unique value from array. So, you can see bellow example i have 34 value two times but when i use array_unique() then it will return only unique value as bellow output: <strong>Example:</strong> <pre class="prettyprint lang-php"> $myArray = [11,34,56,78,34]; $myArrayNew = array_unique($myArray); print_r($myArrayNew); </pre> <strong>Output:</str.....

By Hardik Savani | July 14, 2016 | | 617 Viewer | Category : PHP
READ MORE

    How to get gravatar image from email using Jquery?

    How to get gravatar image from email using Jquery?

    Open Post

    How to execute artisan commands from route or controller in Laravel ?

    How to execute artisan commands from route or controller in Laravel ?

    Open Post

    How to add multiple markers in google map

    How to add multiple markers in google map

    Open Post

    Bootstrap - Show/Hide(toggle) Password input field using bootstrap-show-password.js Plugin

    Bootstrap - Show/Hide(toggle) Password input field using bootstrap-show-password.js Plugin

    Open Post

    How to install composer using command line in ubuntu ?

    How to install composer using command line in ubuntu ?

    Open Post

    How to use login throttle in laravel 5?

    How to use login throttle in laravel 5?

    Open Post