Thursday, 11 February 2016



you can use this code in the following cases:

1) if you want to save data on submitting form then,
replace onchange=“getSummary2(‘order’)” with onclick=“getSummary2(‘order’)”

2) if you want to save on key up then,
replace onchange=“getSummary2(‘order’)” with onKeyUp=“getSummary2(‘order’)”

3) if you want to save data on change then use the code as it is


---------------------------------------------html code-------------------------------------------------


----------------------------------------------------------------------------------------------------------
------------------------------------------javascript.js--------------------------------------------------
function getSummary2(pass)
{
var	id = document.getElementById("sp_order"+pass).value;
	//alert(pass);
   $.ajax({
     type: "GET",
     url: 'sp_orders.php',
     data: "order=" + id + "&&section_id=" + pass, 
// appears as $_GET['id'] @ your backend side
     success: function(data) {
           // data is ur summary
        //  $('#order').html(data);
		     }

   });

}

-------------------------------------------------------------------------------------------------------------
-----------------------------------------sp_orders.php---------------------------------------------------
include('connect.php');
 $timestamp_complete = date("Y-m-d");
 $order = $_GET['order'];
 $section_id = $_GET['section_id'];
 mysql_query(" UPDATE  d_o_sp_orders  SET status='0' 
WHERE section_id='$section_id'");
		
mysql_query(" INSERT INTO  table (`order_id`, `orders`,
 `section_id`, `status`, `status_timestamp`) VALUES 
(NULL, ' $order', '$section_id', '1', '$timestamp_complete')");

------------------------------------------------------------------------------------------------------------
                                                   

Sunday, 7 February 2016





You can generate unlimited textboxes and unlimited their sub-texboxes by using the below code..

HTML CODE


<input type='text' name=''></input> <input id='btnAdd' type='button' class='btn btn-primary' value='+' onclick='AddTextBox(".$duty_id[$x].")' />
<button onClick=\"toggle_visibility('watch');\">?</button> <div id='TextBoxContainer".$duty_id[$x]."'>
<!--Textboxes will be added here -->
</div>


 JAVASCRIPT CODE


function GetDynamicTextBox(value,id){
var counter='1';
return '<td></td><td><input name = "DynamicTextBox" type="text" value = "' + value + '" id="country'+ id +'" onkeyup="suggest(this.value,'+ id +')" /></td>' +
'<td><input type="button" value="-" class="btn btn-primary hide-print" id="rem_btn" onclick = "RemoveTextBox(this,'+ id +')" /></td>'

counter=counter + 1;
}

function AddTextBox(id) {
var div = document.createElement('DIV');
div.innerHTML = GetDynamicTextBox("",id);
document.getElementById("TextBoxContainer"+id).appendChild(div);
}

function RemoveTextBox(div,id) {
//alert(id);
document.getElementById("TextBoxContainer"+id).removeChild(div.parentNode);
}
For any query write me in comments or email me

Saturday, 8 February 2014

Convert an address to its Long, Lat:

First 23 lines of code will convert your address to its latitude and longitude.

Convert Long, Lat to its according Address:

Lines from 24 to 43 of below code will convert your  latitude and longitude its address.

Calculate Distance /between two Long, Lat:

Lines from 87 to onward of below code will calculate the distance between two given addressess.

NOTE: In case of any error, feel free to ask in comments.

1:  <?php  
2:  $postcode1 = urlencode("bb9 5sh"); // post code to look up in this case status however can easily be retrieved from a database or a form post  
3:    $request_url1 = "http://maps.googleapis.com/maps/api/geocode/xml?address=".$postcode1."&sensor=true"; // the request URL you'll send to google to get back your XML feed  
4:    $xml1 = simplexml_load_file($request_url1) or die("url not loading");// XML request  
5:    $status1 = $xml1->status;// GET the request status as google's api can return several responses  
6:    if ($status1=="OK") {  
7:      //request returned completed time to get lat / lang for storage  
8:      $lat1 = $xml1->result->geometry->location->lat;  
9:      $long1 = $xml1->result->geometry->location->lng;  
10:      echo "$lat1,$long1"; //spit out results or you can store them in a DB if you wish  
11:    }  
12:    if ($status1=="ZERO_RESULTS") {  
13:      //indicates that the geocode was successful but returned no results. This may occur if the geocode was passed a non-existent address or a latlng in a remote location.  
14:    }  
15:    if ($status1=="OVER_QUERY_LIMIT") {  
16:      //indicates that you are over your quota of geocode requests against the google api  
17:    }  
18:    if ($status1=="REQUEST_DENIED") {  
19:      //indicates that your request was denied, generally because of lack of a sensor parameter.  
20:    }  
21:    if ($status1=="INVALID_REQUEST") {  
22:      //generally indicates that the query (address or latlng) is missing.  
23:    }  
24:       function getaddress1($lat1,$long1)  
25:  {  
26:  $url1 = 'http://maps.googleapis.com/maps/api/geocode/json?latlng='.trim($lat1).','.trim($long1).'&sensor=false';  
27:  $json1 = @file_get_contents($url1);  
28:  $data1=json_decode($json1);  
29:  $status1 = $data1->status;  
30:  if($status1=="OK")  
31:  return $data1->results[0]->formatted_address;  
32:  else  
33:  return false;  
34:  }  
35:  $address1= getaddress1($lat1,$long1);  
36:  if($address1)  
37:  {  
38:  echo $address1;  
39:  }  
40:  else  
41:  {  
42:  echo "Not found";  
43:  }  
44:  echo "<br/>";  
45:  $postcode = urlencode("ab13"); // post code to look up in this case status however can easily be retrieved from a database or a form post  
46:    $request_url = "http://maps.googleapis.com/maps/api/geocode/xml?address=".$postcode."&sensor=true"; // the request URL you'll send to google to get back your XML feed  
47:    $xml = simplexml_load_file($request_url) or die("url not loading");// XML request  
48:    $status = $xml->status;// GET the request status as google's api can return several responses  
49:    if ($status=="OK") {  
50:      //request returned completed time to get lat / lang for storage  
51:      $lat = $xml->result->geometry->location->lat;  
52:      $long = $xml->result->geometry->location->lng;  
53:      echo "$lat,$long"; //spit out results or you can store them in a DB if you wish  
54:    }  
55:    if ($status=="ZERO_RESULTS") {  
56:      //indicates that the geocode was successful but returned no results. This may occur if the geocode was passed a non-existent address or a latlng in a remote location.  
57:    }  
58:    if ($status=="OVER_QUERY_LIMIT") {  
59:      //indicates that you are over your quota of geocode requests against the google api  
60:    }  
61:    if ($status=="REQUEST_DENIED") {  
62:      //indicates that your request was denied, generally because of lack of a sensor parameter.  
63:    }  
64:    if ($status=="INVALID_REQUEST") {  
65:      //generally indicates that the query (address or latlng) is missing.  
66:    }  
67:       function getaddress($lat,$long)  
68:  {  
69:  $url = 'http://maps.googleapis.com/maps/api/geocode/json?latlng='.trim($lat).','.trim($long).'&sensor=false';  
70:  $json = @file_get_contents($url);  
71:  $data=json_decode($json);  
72:  $status = $data->status;  
73:  if($status=="OK")  
74:  return $data->results[0]->formatted_address;  
75:  else  
76:  return false;  
77:  }  
78:  $address= getaddress($lat,$long);  
79:  if($address)  
80:  {  
81:  echo $address;  
82:  }  
83:  else  
84:  {  
85:  echo "Not found";  
86:  }  
87:  /*::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/  
88:  /*::                                     :*/  
89:  /*:: This routine calculates the distance between two points (given the   :*/  
90:  /*:: latitude/longitude of those points). It is being used to calculate   :*/  
91:  /*:: the distance between two locations using GeoDataSource(TM) Products  :*/  
92:  /*::                                                                             :*/  
93:  /*:: Definitions:                              :*/  
94:  /*::  South latitudes are negative, east longitudes are positive      :*/  
95:  /*::                                     :*/  
96:  /*:: Passed to function:                          :*/  
97:  /*::  lat1, lon1 = Latitude and Longitude of point 1 (in decimal degrees) :*/  
98:  /*::  lat2, lon2 = Latitude and Longitude of point 2 (in decimal degrees) :*/  
99:  /*::  unit = the unit you desire for results              :*/  
100:  /*::      where: 'M' is statute miles                  :*/  
101:  /*::         'K' is kilometers (default)             :*/  
102:  /*::         'N' is nautical miles                 :*/  
103:  /*::                                              :*/  
104:  /*::                                            :*/  
105:  /*::                                          :*/  
106:  /*:: For enquiries, please comment below    :*/  
107:  /*::                                     :*/  
108:  /*::         Ahmed Developer             :*/  
109:  /*::                                     :*/  
110:  /*::                                     :*/  
111:  /*::                                     :*/  
112:  /*::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/  
113:  function distance($lat3, $lon3, $lat4, $lon4, $unit) {  
114:   $theta = $lon3 - $lon4;  
115:   $dist = sin(deg2rad($lat3)) * sin(deg2rad($lat4)) + cos(deg2rad($lat3)) * cos(deg2rad($lat4)) * cos(deg2rad($theta));  
116:   $dist = acos($dist);  
117:   $dist = rad2deg($dist);  
118:   $miles = $dist * 60 * 1.1515;  
119:   $unit = strtoupper($unit);  
120:   if ($unit == "K") {  
121:    return ($miles * 1.609344);  
122:   } else if ($unit == "N") {  
123:     return ($miles * 0.8684);  
124:    } else {  
125:      return $miles;  
126:     }  
127:  }  
128:  echo "<br/>";  
129:  $mm=distance("$lat1", "$long1", "$lat", "$long", "M");  
130:  echo number_format((float)$mm, 2, '.', ''). " Miles<br>";  
131:  //echo distance("$lat1", "$long1", "$lat", "$long", "K") . " Kilometers<br>";  
132:  //echo distance("$lat1", "$long1", "$lat", "$long", "N") . " Nautical Miles<br>";  
133:  ?>  

Thursday, 5 December 2013



1. Google:
 
Founded by: Larry Page & Sergey Brin
2. Facebook:

Founded by :
Mark Zuckerberg

 
3. Yahoo:
 
Founded by: David Filo & Jerry Yang
 

4. Twitter:
 
Founded by: Jack Dorsey & Dick Costolo
 
5. Internet:
 
Founded by: Tim Berners Lee
6. Linkdin:
 
Founded by: Reid Hoffman, Allen Blue & Koonstantin Guericke
 
7. Email:
 
Founded by: Shiva Ayyadurai
 
8. Gtalk:
 
Founded by: Richard Wah kan
 
9. Whats up:
 
Founded by: Laurel Kirtz
 
10. Hotmail:
 
Founded by: Sabeer Bhatia
 
11. Orkut:
 
Founded by: Buyukkokten
 
12. Wikipedia:
 
Founded by: Jimmy Wales
 
13. You tube:
 
Founded by: Steve Chen, Chad Hurley & Jawed Karim
 
14. Rediffmail:
 
Founded by: Ajit Balakrishnan
15. Nimbuzz:
 
Founded by: Martin Smink & Evert Jaap Lugt
 
16. Myspace: 
Founded by: Chris Dewolfe & Tom Anderson
 
17. Ibibo:
 
Founded by: Ashish Kashyap
 
18. OLX:
 
Founded by: Alec Oxenford & Fabrice Grinda
 
19. Skype:
 
Founded by: Niklas Zennstrom,JanusFriis & Reid Hoffman
 
20. Opera:
 
Founded by: Jon Stephenson von Tetzchner & Geir lvarsoy
21. Mozilla Firefox:
 
Founded by: Dave Hyatt & Blake Ross
 
22. Blogger:
 
Founded by: Evan Willams

Friday, 15 November 2013

PhP 5.5.6 has been released yesterday.

All the users of PhP 5.5.5 should upgrade to this latest stable version.

By Default MySQL Server didn’t use a password to access it. And a default user name ‘root’ is used to access MySQL Server.

Manually we can set a new user name and a password to access MySQL Server.

·        Open this URL : http://localhost/phpmyadmin/
·        Click on the Privileges tab.
·        Here you may ‘Add a New User’ or edit privileges of default user.
·        Edit Privileges: User 'root'@'localhost'
·        Set a new password for default user ‘root’
·        Refresh the URL : http://localhost/phpmyadmin/

·        Now you will face an error like this:


It shows that you can not view Localhost without a password.

SOLUTION:

  • Open this file :
    • C:\wamp\apps\phpmyadmin3.2.0.1\config.inc
  • Find this statement:
    • $cfg['Servers'][$i]['password'] = '';
  • And replace with this statement:
    • $cfg['Servers'][$i]['password'] = 'yourpassword';  

Thursday, 7 November 2013

1)Purchasing of FB.com:

15 Nov 2010 facebook purchased fb.com in 8.5 million dollar

2)LAW of  Island is written with the Help of facebook:


In 2011 LAW of Island was written with the help of facebook.

3)Mark Zuberg :: facebook Wall ID



it will redirect you to his wall.

4) $500 USD Prize

Find a bug in facebook and get prize of $500USD.

The biggest Company of smart phones SAMSUNG sends a new smart phone in the market, which have a different and rounded screen. Due to this feature its name is Glaxy Round.

LG have also announced few months before that they are currently working an rounded screen technology and in the start of next year they will send their rounded screens products in the market.

Specifications of Galaxy Round:

Screen             :                       5.7 inch Rounded 1080HD
Camera            :                       13 Megapixel
Processor         :                       2.3 Quad Core
RAM               :                       3GB

Please wait......

Please wait......

Super Cookies by Google and Microsoft

Google, Yahoo and Microsoft are using cookies from last two centuries. But now its time to say Good Bye! to cookies because they are not fulfilling their requirements.

Including Google all the famous companies are in search of alternate to the cookies, which may fulfill their requirements.

Cookies are text files which are saved by Websites in visitor’s PC using Browser. In these text files the information (password etc) about the user is saved about the specific website.

Cookies are also used by many advertising sites to know the interests of the user, so that ads could be displayed to targeted user.

Internet is not bounded to use by PCs and Laptops only, but it could be used from Tablets and smart phones. So it is difficult for cookies to know that same user is using internet from smart phone and PC. So that cookies couldn’t store information about the same user on all devices.

That is the reason which force the companies to think cookies alternate.

Wednesday, 31 July 2013


Any Video Converter (AVC) is the best tool to convert videos. Using this software, we can easily convert all the type of videos into different formats e.g. mobile video, Flash video, DVD. MPEG,  mkv. Mp3, Mp4 etc. The software takes very short time to convert a video. It is auto registered software and very simple to install and use.



How to install:-

There are five simple steps to install this software.

STEP 1:-Open the folder containing software of AVC. Click the icon.

STEP 2:-Following box will appear on screen and you have to adjust the language suitable to you.


STEP 3:-Then by following the easy instructions you will reach to the box.



STEP 4:-Press install and wait for few seconds till installation complete. Then press finish.



STEP 5:-When you press finish, the installation will complete and software will appear on screen for working




How to use:-


The working of this converter is quite simple. You may follow the following steps to use.

There are three simple steps to convert a video using any video converter.

STEP 1:-Click the button and add videos which you want to convert.



STEP 2:-Select the output format. And set the desired output folder like this.



STEP 3:-Then press convert button ant wait for few seconds to complete conversion.
When conversion will complete the following box will appear. you may open the output folder and use the converted file.



For feedback, e-mail to      (jaq101@yahoo.com)

Friday, 22 February 2013

Steps to create a blog with blogger.com
  •  Go to Gmail.com
  •  Create a new account, If you didn't have before.
  •  Open Blogger.com
  • Login with your Gmail account
  •  Click on "Create your Blog now"
  • Now give blog title and choose domain
  • Choose a template and click next.
  • Your blog is created
Steps to publish your first post 
  •  Click on start blogging button
  • Then click on new post
  • Give title of you post in TITLE textbox.
  • Both HTML and simple wording can be inserted.
  • You can preview your post by clicking PREVIEW button before publishing
  • Save and Publish your post.
  • Now your post is published and available for the audience.
Steps to Modify your first post 
  •  You can insert image by
    1. click on image button
    2. uploade an image from computer OR
    3. give a URL of the image
    4. you can set position(layout) of image
  •  You can change font
    1. Text color, size
    2. Text numbring
    3. click on link button to set a back-link