Author Archive

Response message

By-default “Form 7” response message comes in the bottom of form, we can change its location, like in blow image i have written “[response]” at the top of my contact form, it will display the message at the top of the form.

Fetch Duplicate Records

following is the query through which we can fetch duplicate records in our table, let’s take a example of emp table:- “SELECT name FROM emp GROUP BY name HAVING COUNT(name) > 1” we will get duplicate names from emp table.

short_open_tag

Generally we use “<?php ……  ?>” to write the php code, but we can also use “<? ……….. ?>” tags to write the php code, these are call short open tag in php. To make this tag work we have to make “short_open_tag = On” php php.ini file which exists in c:\xampp\php folder.

@ Magic

@ is use to avoid the warning. Example :- when we use session_start(), some time it will display the error “Warning: Cannot modify header information – headers already sent by” to avoid this warning we can start session like :- @session_start();

About Php

php is server side scripting language. Php developed in 1995 by Rasmus Lerdorf. Early versions PHP was called Personal Home Page but it not seem to be a technical, so php rename “Hypertext Preprocessor”, or we can say “Personal Home Page Hypertext Preprocessor”. Advantages :- 1) Its free. 2) Open source. 3) Easy to understand.

get_permalink function

get_permalink() is a function in WordPress through which we can get the link of post or page. This function is helpful when we are customizing our posts or page. For Ex. I have called all the post whose category id is 3 on page and want to display a link of detail page of the

Add Dynamic Sidebar in WordPress

Steps for how to add Dynamic Sidebar in WordPress:- 1. Register sidebar in function.php as other sidebar registered, we can copy and past the as given in function.php for other sidebars. 2. Call on page:- dynamic_sidebar(‘sidebar-4’);