How to retrieve value from elements in array using jQuery?

I have multiple input fields like so: <input type=”text” name=”card[]”> <input type=”text” name=”card[]”> <input type=”text” name=”card[]”> Users can add or remove these fields as required, therefore the name of the fields is an array. To get length of the array, this works fine: var n = $(“input[name^= ‘card’]”).length; How can I read value from the […]

Read More

PHP Code for checking Internet Connection

Using this simple php function we can detect whether the Internet connection is working or not if the internet connection is working the following function will return bool value of 1 else return blank <?php function check_internet_connection($sCheckHost = ‘www.google.com’) { return (bool) @fsockopen($sCheckHost, 80, $iErrno, $sErrStr, 5); } $test = check_internet_connection(); print_r($test); ?>

Read More

How to change User and Database in Vesta CPanel

Changing user for web and database is very simple in Vesta Cpanel, Only we have to run some command and thats it. So, here is the command by which we can change the User for web and database in Vesta Cpanel. for changing user for Web v-change-domain-owner {DOMAIN} {NEWUSERNAME} For Changing user for Database v-change-database-owner […]

Read More

Laravel – Can’t get session in controller constructor

In latest version of Laravel , Session is not getting in constructor or in Pages. I solved this problem by doing some stuffs You can’t do it by default with Laravel 5.3. But when you edit you Kernel.php and change protected $middleware = []; to the following it wil work. Hope this works!

Read More

How to create template in Laravel

To create a template in laravel go to following folder :- views/layouts and create a file yourtemplate.blade.php and paste the following code @include(‘includes.dashboard.header’) @include(‘includes.dashboard.sidebar’) @yield(‘content’) @include(‘includes.dashboard.footer’) Include word determines the file for header, sidebar and footer then you can create the respective files there   to add the content you can call this template directly […]

Read More

Everything about CSRF Protection Laravel

If you’ve tried to create and submit a form in a Laravel application already you’ve likely run into TokenMismatchException. in many cases you will try to disable the CSRF protection and then move on buy is that really worth. Laravel takes care of the security very seriously..So sit back and relax this post is going to […]

Read More

A Guide to SSH Port Forwarding/Tunnelling

SSH is a widely used protocol for system administration and file transfer. In addition, it has a feature called SSH tunnelling  (or SSH port forwarding). It creates an encrypted connection between a local computer and a remote computer through which you can relay traffic. It is very useful, and you can use it to securely […]

Read More

how to create virtual host in xampp

Here is the method for creating virtual host in xampp go to this file :  xampp->apache->conf->extra->httpd-vhosts.conf edit this file using notepad or notepad++ at the end of the file paste the following code :- <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot “E:/server/shiv/” ServerName shiv ServerAlias shiv ErrorLog “logs/shiv.log” CustomLog “logs/shiv.log” common <Directory “E:/server/shiv/”> Options Indexes FollowSymLinks MultiViews […]

Read More