Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
html

Featured

How to implement load more dynamic results functionality using jQuery, Ajax Php and Database?

To display or load more results, whether it is commenting on a blog website, like or images on social media or products on eCommerce website the best UX pattern for this is either pagination, a Load more button or infinite scrolling. In this tuto...

Full Calendar Events From Database

1- Create a mysql Database.   2- Create a Table events inside created database.    CREATE TABLE `events` ( `id` int(10) NOT NULL AUTO_INCREMENT, ...

Drow Basic Lines Using Highchart

1- First of all place JS file in JS folder.         jquery-1.11.0.min.js         highcharts.js         exporting.js   2- ...

Jcrop image croping

1- Place JS and CSS files under head tag. jquery.min.js jquery.Jcrop.js main.css demos.css jquery.Jcrop.css   2- Also copy and paste bellow piece of javascript code under head tag. <script type="text/javascript"...

How to check if mobile is already register during register via ajax

Hello Reader's if you are developing a user based registration portal and you want to make unique mobile number facility then you can do this via ajax and php. In this tutorial we will see how to develop the portal which will check and verify...

Active Inactive button in cakephp using ajax

Suppose we have a table name player and in player table we have field like id , image,player_name, status,  etc. Suppose data inside fields are id=1, name=ram, image=abcd.jpg and status=0, Now we want to change status to 1, and again we have...

How to fetch data from two table in cake php

Suppose we have a table name player having field id, name of player, images, etc having some data .Now we have another table name playergallery having field like id, player_id, images, etc here player_id is foreign key and it is referencing to ta...

How to make two divs equal in height lying side by side using html and css?

Hello Readers , this is a small blog on how to make two columns of equal height regardless of content inside the columns. First, we will write the HTML to make two columns lying side by side having same width. The following code is written to mak...

how does foreach loop exactaly work in php

The foreach function in php will be used for a easy way to iterate over the loop and it is only used in array and objects or It will give you an error when you try to use it on a variable with different data type. Syntax: foreach(array_e...

Fetching Data from database using php

To fetch a data from database by using simple PHP code,  firstly create a connection to the database by using simple query and create a login form using HTML code for entering values through user. on clickinng submit button, This form will b...

$_GET and $_POST methods in php

Explanation of GET and POST methods in php GET and POST are treated as $_GET and $_POST in php. These are superglobals, which means that they are always accessible. $_Get: This is used as an array of variables and passed to the current scrip...

How to print all the files in a directory using PHP

Hello Reader's if you need to get all the files that exists inside any directory then you can get it by using codeigntier FTP class library. This is quick and very easy to get result. For example if you have amazon S3 bucket and you wish to get...

How to get playtime, height and width of a vedio by PHP

Hello Reader's if you want to get the details about the vedio from your local server then you can use the code liberary as below:- $ffmpeg_path = 'ffmpeg'; //or: /usr/bin/ffmpeg - depends on your installation $vid = 'PATH/TO/VIDEO'; //Rep...

How to add two objects into one using PHP

Hello Reader's if you want to add two or more objects into one. Then you can see it into the example below:- Ideally if you want the data to be together, you should have a parent class which has all these member functions and you should have a...

How to superimpose one image over another using PHP

Hello Readers if you have two images i.e. one png and one jpg, Then by using PHP you can merge both on a single one. Lets see the example as given below:- <?php # If you don't know the type of image you are using as your originals. $...

How to redirect 404 error page to custom 404 page

When a visitor visits any wrong URL in the site , they see 404 not found error comes from server side by default. We can redirect the visitor from any invalid URL to any of the custom page or any page we want. For the most of the sites , we see t...

How to select images from database and show on page

Hello Reader's! If you have stored the image in database as blob. Then you need a php code to retrieve them and a html page to show them. Lets see an example below how to show them First create a php page getImage.php and code as written below...

How to parse and process HTML in PHP?

Hello Readers! If you want to parse any HTML page then you would you "Simple HTML DOM Parser". How to get HTML elements: Create DOM from URL or file $html = file_get_html('http://www.example.com/'); Find all images foreach($ht...

How to check if cookie is enable or not

Hi. If you are looking for code to alert user if his cookies are enable or not, Then look the code as below:- paste the code in you file <?php if (isset($_COOKIE['cookieCheck'])) { echo 'Your cookie is Enable'; } else { if ...

Laravel 5.0 Getting Old Values In the form

Many times we need to show our old values in a form after an error or validation stops our form from submitting. Laravel has a very nice way of retaining old values and populating it back into our form. I myself used it in a drop down, where ...

How to detect UTF encoding using PHP

Hello Readers! if you want to find out the type of file encoding using php then the code below will help you:- //check string strict for encoding out of list of supported encodings $enc = mb_detect_encoding($str, mb_list_encodings(), tr...

How to get color of image for the background using PHP

Hello Readers! If you are developing the dynamic website in which the image color will be the background color then you can see it doing in PHP :- <?php $filename = $_GET['filename']; $image = imagecreatefromjpeg($filenam...

How to make text url to hyperlink using PHP

Hello Reader!, On printing the url in plain text, they do not appears as hyper linked but using PHP you can perform this. Let's see the example below that takes a plan url as input and return the hyperlinked url:- <? function createHyper...

How to validate a given URL using PHP

Hello reader! If you have a to check the url is correct or not (not giving the status 404), Then you can get all the details of any url by using 'get_headers' in print_r. Let's see the example below:-0 <?php stream_context_set_default( ...

Use of '@' in PHP

Hello Reader!, You might have seen people using the '@' in the PHP coding. The operator '@' is used when you don't want to show the error messages even if they occur. By using '@' the errors will be hidden. Let's see the two syntax below:- ...

How to find OS version from web browsers using PHP

Hello Reader! If you want to detect the OS version of user though the web browser. Then you can use the library code below:- <?php $OSList = array ( // Match user agent string with operating systems 'Windows 3.11' => 'Win16', 'Wi...

How to print HTML page with tags using PHP

If you have any blogs or coding part that you need to show with the html tags, Then using PHP then you can perform this task Lets say print the line below:- <h1>I'm printing this line using the HTML tags</h1> To print this...

How to detect mobile device in website using PHP

If you want to know any mobile device is accessing your website, Then the easy way to detect device is to run a php code. Lets see the code below :- <?php $useragent=$_SERVER['HTTP_USER_AGENT']; if(preg_match('/(android|bb\d+|meego)...

How to send SMS using PHP

Php offers you to make the integration of sms. We will discuss how to use php to send sms to any mobile number:- Before we starts you need to have some any sms pack from mobile data companies but if you don't have you can make one you from twi...

base_url in CakePHP

Hello if you want current base url(Include Domain) or Get current url. Lets take an example http:// localhost/root_folder. you just need to write the following code below:- <?php echo $this->Html->url('/', true)?>

How to disable caching completely in Cakephp?

Hello if you want to disable you website's caching complety you just need to write configure code in core.php file ex You will have to look into /app/config/core.php and look for the line Open app/config/core.php file and try to find Con...

How can we find the number of days between given two dates on php 5.3 and above

Hi if you are using php version 5.3 or greater then some functions are really very quick to write and use. In this blog I am calculating the days between your given two dates. This is by far the most accurate way of calculating the differenc...

Google Map integration in PHP to Calculate Latitude and Longitude

This code will calculate the latitude and longitude of the place in background on entering the place name. For integration of Google map to calculate Latitude and Longitude major script is : <script src="https://maps.googleapis.com/maps/...

Introduction to php

<html> <head> <title>Example</title> </head> <body> <?php echo "Hi, I'm a PHP script!"; ?> </body> </html> PHP(Hypertext Prepr...

How to create a class and object in php

class rect { public $length=0; public $width=0; public $area=0; public function getData() { $this->length=10; $this->width=20; } public function area() { $this->area = $this->leng...
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: