Wednesday 10 September 2014

How to Add a Widget to Blogger

Widgets, also known as gadgets, are small tools or applications that can be added to a website or blog to enhance its content or functions, or to pull content and services from third-party websites. Widgets come in multiple forms, such as countdown tickers, photos, games, or interactive social media applications that allow you to chat. Some widgets in Blogger serve the purpose of enhancing your blog, such as listing your blog followers or allowing readers to subscribe to your blog content. Here are steps on how to add a widget to Blogger.

Tuesday 9 September 2014

PHP Paging


I have made a website for flat selling. Many customer enquiries daily for flat booking by filling enquiry form. I have made an admin page which shows enquiry data of customer, everything was ok but when enquiry got increase then admin page data also increase so my client had to scroll very long that was not a good interface. So I decided to show enquiry table content page wise.
Thanks to limit clause used by MYSQL. You can use limit clause with select statement for limit the returns row from database, its takes two clause as a record number start and stop

I.e. Select * from Enquiry limit 0, 10


You can change limit clause argument for desire row, fist number for start and second one stand for stop retrieving row form table.

Click here to download full example

Tuesday 26 August 2014

Core Java Programming



This post is for student who study java and they need many programs in their exam and test so I am trying to make some java programs which help them to make their work easy 

Question : Write a program which accept input of full path of a file and produce following output?
Input : C:/Users/Public/Pictures/SamplePictures/Desert.jpg
Output :
Extension : jpg
File Name : Desert
Path : C:/Users/Public/Pictures/SamplePictures

Solution :

import java.util.*;
public class Main
{

       public static void main(String[] args)
    {
        String str;
        Scanner sc=new Scanner(System.in);
        System.out.print("Enter your name>> ");
        str=sc.nextLine();

Monday 18 August 2014

How to send email a form data using php


Form is a electronic way where organization gathered data from user through website. A website owner usually take details of esquires to his website using login provide by the website developer.
But we are familiar with email because it’s an era  of android word and every one configure email with mobile so sending form data in email as well as database is a good idea.
PHP provide a easy way to achieve this just take a look on flowing code and please don’t say thanks to me.

                    $to =' rajkumar9795@gmail.com';
                  $subject = 'Enquiry Data';
                  $message = "<h2>Welcome This is Enquiry for Now</h2><hr>Name : $_POST[name]<br>Gender :  $_POST[gen]<br>Course : $_POST[course]<br> Email : $_POST[email]<br>Mobile : $_POST[phone]<br>Query : $_POST[query]";
                 
                  $headers = 'From: bcmt@basantgroupofinstitution.org' . "\r\n" .
                                  'Reply-To: basantcollege.mt@gmail.com' . "\r\n" .
                                  'X-Mailer: PHP/' . phpversion().
'MIME-Version: 1.0' . "\r\n".
'Content-type: text/html; charset=iso-8859-1' . "\r\n";
                 
                            mail($to, $subject, $message, $headers);