JavaScript Luhn modulus implementation

The following luhn_check() function is a small JavaScript function which checks whether a number is a valid based on the Luhn algoritm. One common example of use is with credit and debit card numbers. This function may be used to check for valid credit card numbers, however additional checks may be desired, such as card prefix and length checks.

There’s a…

Posted in: Code Snippets by Plan Zero 4 Comments

PHP Luhn modulus implementation

The following luhn_check() function is a small PHP function which checks whether a number is a valid based on the Luhn algorithm. One common example of use is with credit and debit card numbers. This function may be used to check for valid credit card numbers, however additional checks may be desired, such as card prefix and length checks.


<?php
/* Luhn…

Posted in: Code Snippets by Plan Zero 6 Comments

BBEditor, the free BBCode editor

Well, I said that I’d be using this blog to publish code, so here’s my latest little project.

BBEditor is a free BBCode editor written in JavaScript for HTML/PHP. It’s standards compliant, and really is rather sexy.

BBEditor edit bar

Features:

  • Easy to integrate
  • Cross-browser compliant
  • Degrades wonderfully in old or non-compliant browsers
  • Sleek code – fast loading, no bulk, no mess
  • Easy to style to your needs
  • Adding additional buttons and…
Posted in: Code Projects by Plan Zero 21 Comments