Category Archives: Programming

Redirect one domain to another domain in htaccess file

Hi, RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !unlimited.ndot.in$ [NC] RewriteRule ^(.*)$ http://unlimited.ndot.in/$1 [L,R=301] Here unlimited.ndot.in is my destination domain name.

  • October 14, 2012 |
  • 0 Comments
Posted in Programming | Tagged , , | Leave a comment

Adding google+1 button to your websites

Hi, Google has just released the Google +1 button which webmasters can add to their site / blog and enable visitors to give a recommendation to Google and your friends about your site. Webmasters can get the +1 button code … Continue reading

  • October 14, 2012 |
  • 0 Comments
Posted in Programming | Tagged , , , | Leave a comment

mysql date_format() list

DATE_FORMAT() function formats the date by specifying a sequence of format strings. A string is composed of the percentage symbol ‘%’ followed by a formatting letter. These are some of the more common strings to use: Specifier Description %a Abbreviated … Continue reading

  • October 14, 2012 |
  • 0 Comments
Posted in Programming | Tagged , , , , | Leave a comment

Mailer Error: SMTP Error: Could not connect to SMTP host.

Hi guys, I would like to share my experience about smtp mail configuration… I am trying to send mail in php through gmail smtp configuration… Its working well in some application. In same time getting this error in few application … Continue reading

  • October 14, 2012 |
  • 0 Comments
Posted in Programming | Tagged , , | 1 Comment

check/uncheck the multiple checkboxes in php

<span>Select : </span> <a href=”javascript:request_all();” title=”All”>All</a> &nbsp; <a href=”javascript:request_none();” title=”None”>None</a> </p> //pending request all function request_all() { if(document.pending_request.pending_req_list.length==undefined) { document.pending_request.pending_req_list.checked=true; } for(var i=0; i < document.pending_request.pending_req_list.length; i++) { if(!document.pending_request.pending_req_list[i].checked) { document.pending_request.pending_req_list[i].checked=true; } } } //pending request none function request_none() { … Continue reading

  • October 14, 2012 |
  • 0 Comments
Posted in Programming | Tagged , , , | 2 Comments

paypal currency code for multiple country currency format

EUR for Euro USD for U.S. Dollar GBP for Pound Sterling CAD for Canadian Dollar JPY for Yen AUD for Australian Dollar NZD for New Zealand Dollar CHF for Swiss Franc HKD for Hong Kong Dollar SGD for Singapore Dollar … Continue reading

  • October 14, 2012 |
  • 0 Comments
Posted in Programming | Tagged , , | Leave a comment

select the text box value in onclick

<script type=”text/javascript”> function SelectAll(id)         {             document.getElementById(id).focus();             document.getElementById(id).select();         } </script> <input id=”share_link” onclick=”SelectAll(‘share_link’);” type=”text” value=”text value” />

  • October 14, 2012 |
  • 0 Comments
Posted in Programming | Tagged , , , , , | Leave a comment

Php random text generating for forgot password and etc..,

//generate random code function createRandomPassword() { $chars = “abcdefghijkmnopqrstuvwxyz023456789″; srand((double)microtime()*1000000); $i = 0; $pass = ” ; while ($i <= 7) { $num = rand() % 33; $tmp = substr($chars, $num, 1); $pass = $pass . $tmp; $i++; } return … Continue reading

  • October 14, 2012 |
  • 0 Comments
Posted in Programming | Tagged , , , , | Leave a comment

Lost connection to MySQL server at ‘reading initial communication packet’, system error: 113

Hi to all, While connecting DB in php, I am getting error called “Lost connection to MySQL server at ‘reading initial communication packet’, system error: 113″. What is the reason to get this error. Anybody to know about it. thanks … Continue reading

  • October 14, 2012 |
  • 0 Comments
Posted in Programming | Tagged , , , , | Leave a comment