Author name: Yang Yang

Hello, I'm Yang. I build online businesses that please people. Want to join in and post some useful articles on Kavoir.com? Shoot me a message.

CSS: Double Border

In pure CSS solutions, a double border can be achieved via either a combination of single borders or a single double border style. 2 single borders The HTML: <div class="wrap-1"> <div class="wrap-2"> </div> </div> The CSS: .wrap-1 { border:1px solid blue; padding:1px; /* how far away 2 borders are drawn, remove this line to make …

CSS: Double Border Read More »

CSS: Difference between opacity:0, visibility:hidden and display:none

If you are going to make part of the page totally transparent, there are essentially 3 CSS ways to achieve element transparency: opacity:0 (needs 2 more hacks for different browsers) visibility:hidden display:none Bob, the man! Let me take the example of Bob sitting in a chair to explain how these styles are different from each …

CSS: Difference between opacity:0, visibility:hidden and display:none Read More »

CSS: Styling File Upload / Select Input Control <input type="file" … />

Let’s face it, the native implementations of file uploading control of HTML form is ugly, throughout most of the browsers, and not consistent at all. Plus, <input type=”file” … /> just doesn’t play by quite a few of the CSS input styling rules such as border and background, making it a even bigger challenge. Now …

CSS: Styling File Upload / Select Input Control <input type="file" … /> Read More »

Log Walking – Walk through your website logs and be in the shoe of a visitor

Well, just came across a rather insightful post by ronburk at Webmaster World, which by the way, is probably the most resourceful place for any veteran webmaster. Consumer behavioral analysis is one of the most important part of any marketing campaigns in any industry. The better you get to know your customers, the better you …

Log Walking – Walk through your website logs and be in the shoe of a visitor Read More »

JavaScript: Show & Tick a Specific Local Time Clock (Fixed Time Zone) instead of Client Time

When I’m coding for a new sub site where I need to show the local time of mine and my developers’ wherever the visitors are. Things get a little bit more tricky. Time basics in JavaScript and PHP To offset time zone differences in calculation, both JavaScript and PHP specs have time stamps representing the …

JavaScript: Show & Tick a Specific Local Time Clock (Fixed Time Zone) instead of Client Time Read More »

PHP: Checkbox Array in Form Handling – Multiple Checkbox Values in an Array

Checkboxes is probably one of the most frequently used form controls which come handy in dealing with one to many relationships. The multiple selective nature of HTML form checkboxes require a convenient way for PHP to process multiple checkbox values, ideally in a single array. By default, each and every HTML input control including checkboxes …

PHP: Checkbox Array in Form Handling – Multiple Checkbox Values in an Array Read More »

.htaccess: Deny From All – Prohibit, Forbid or Restrict Directory Access

Restricting directory access might be one of the most frequently used .htaccess techniques out there. As a site grows, there always are some areas that you don’t want visitors to look at such as merchandise warehouse where you store digital products for sale. You want a programmed server-side script to serve the download after confirming …

.htaccess: Deny From All – Prohibit, Forbid or Restrict Directory Access Read More »

.htaccess: Directory Listing — Enable Web Directory Browsing & Indexing

One of the best things I love Apache web server is that it instantly enables you to share files and resources via plain web directory index listing without having to spend time making any fancy web pages to serve them. However, there are times when you need to hide things out. To disable web directory …

.htaccess: Directory Listing — Enable Web Directory Browsing & Indexing Read More »

$6.99 .com domain coupon at GoDaddy for both registration and renewal

Update: Here’s the latest coupon code of Godaddy – $1.49 / year .com A quick short post for my fellow readers. If you have quite some domains with GoDaddy, you’d know that ever since they raised the price for .com by $0.5, to find a $6.99 .com GoDaddy domain coupon is rather difficult now. Most …

$6.99 .com domain coupon at GoDaddy for both registration and renewal Read More »

PHP: Escape String Literals for SQL, mysqli::real_escape_string and PDO to Prevent SQL Injection Attacks

To successfully run a query with text data containing single quotes ‘ as well as other SQL reserved punctuations, AND to prevent SQL injections, you will always want to escape the text values before using them in a SQL query. In PHP 4.0, we are stuck with mysql_real_escape_string. With PHP 5.0, mysqli:prepare and mysqli::real_escape_string are …

PHP: Escape String Literals for SQL, mysqli::real_escape_string and PDO to Prevent SQL Injection Attacks Read More »

PHP: Prevent SQL Injection Attacks

SQL injection is a typical code injection attack that exploits weaknesses of application in the database layer. SQL injection vulnerability is created when one scripting or programming language is embedded in or used as input in another with failure to verify the legality or filter for potential dangerous codes. SQL injections are possible when input …

PHP: Prevent SQL Injection Attacks Read More »

Top 25 Most Dangerous Web Programming Errors, Loopholes and Bad Habits

As Web becomes one of the most fundamental means of communication and information delivery nowadays, and as its usage reaches population level in regards to that when the televisions prevailed, the protection of it has never been so critical. SANS institute in association with US government and various other weighty contributors, most of whom IT …

Top 25 Most Dangerous Web Programming Errors, Loopholes and Bad Habits Read More »

Rackspace Cloud $50 Promo Code (Coupon Code for Cloud Servers Discount)

Bad News: Partners program manager of Rackspace Cloud, Kenard Horsley informed me via email that they have made the decision to end the $25 discount for Cloud Sites on 18th, March (2010) and instead focus on Cloud Servers promotion. The promo code (Promo Code ID=134) will be effectively invalidated by then. The Promo or Referral …

Rackspace Cloud $50 Promo Code (Coupon Code for Cloud Servers Discount) Read More »

Scroll to Top